Set default permissions for workflows#185
Open
yedayak wants to merge 1 commit into
Open
Conversation
52f5915 to
8f48565
Compare
Owner
|
To consider this, I'll need a more detailed commit message. What is the effect of this change? Why is it valuable? It will also need a |
Old github repositories created before 2023 run jobs with a GITHUB_TOKEN that has write permissions by default for PRs from inside the repo (not a fork), unless set otherwise in the repository.[0][1] [0] https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/ [1] https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ Set it explicitly so there won't be a chance that a compromise of an action will be able to modify anything in the repository. Pointed out by zizmor[2] [2] https://github.com/zizmorcore/zizmor Signed-off-by: Yedaya Katsman <yedaya.ka@gmail.com>
Author
Updated with more detail, and added SoB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Old github repositories created before 2023 run jobs with a GITHUB_TOKEN
that has write permissions by default for PRs from inside the repo (not
a fork), unless set otherwise in the repository.[0][1]
[0] https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
[1] https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
Set it explicitly so there won't be a chance that a compromise of an action
will be able to modify anything in the repository.
Pointed out by zizmor[2]
[2] https://github.com/zizmorcore/zizmor