Add Dependabot permissions warnings - #37733
Conversation
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksThe table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
|
Please let me know if I am misunderstanding the security risk here, or if you would like the warnings to be changed. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
@Marcono1234 Thanks for opening these! I'll get this triaged and look for an SME to review the specifics. We appreciate the time you're investing to improve the documentation. 💛 |
|
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
This comment was marked as spam.
This comment was marked as spam.
|
This is a gentle bump for the docs team that this PR is waiting for technical review. |
|
This is a gentle bump for the docs team that this PR is waiting for technical review. |
|
This is a gentle reminder for the docs team that this PR is waiting for technical review by a subject matter expert. |
|
A stale label has been added to this pull request because it has been open 30 days with no activity. If you think this pull request should remain open, please add a new comment. |
|
This is a gentle reminder for the docs team that this PR is waiting for technical review by a subject matter expert. |
|
Hi @Marcono1234, thank you for raising this and I apologise for such a late conclusion— I've passed this on to the Dependabot team, but we're not going to make any updates to the documentation to this effect at this time. I would recommend opening a new discussion in our community, as that would give us a better idea how many users would benefit from updates such as this. Again, please accept my apologies for the late conclusion and for the fact that this won't be the update you were hoping for. We hope to see you again 🙇 |
|
Thanks for the update! The recently added default cooldown might have reduced the risk of this a bit, but I still think the proposed warnings might be useful, maybe at least as "Note". I suspect a discussion would not be really helpful; to me this seems like a niche topic for which not many users would actively search (unless they are already aware of the problematic effects). Anyway, I can understand if you don't want to or don't have the capacity currently for these changes. |
Why:
Dependabot intentionally has no built-in automerge feature (dependabot/dependabot-core#1973 (comment)), and in the past permissions for Dependabot workflows were changed to read-only by default (changelog entry).
If I understand it correctly, the concern is that a Dependabot workflow with write permissions could be exploited by a compromised dependency to immediately compromise the consuming repository as soon as the Dependabot PR is created, without any interaction of the owner.
Therefore adding a custom automerge workflow for Dependabot or giving its workflows write permissions can be a security risk, and is probably worth pointing out in the documentation.
Slightly related to #37657, but does not resolve it
What's being changed (if available, include any code snippets, screenshots, or gifs):
Add warnings to the documentation to inform users about the risk of giving Dependabot workflows more permissions.
I hope these warnings do not seem like fear mongering (any feedback regarding wording is welcome!). Maybe some users who set up auto merging of Dependabot PRs might not consider this a big issue (or an issue at all).
Check off the following: