Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Minimize permissions granted to automated workflows / jobs #328

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

jigpu
Copy link
Member

@jigpu jigpu commented Nov 30, 2023

Jobs that use the GITHUB_TOKEN to perform sensitive actions on behalf of a real user may be granted a range of permissions. Instead of granting blanket permissions to read and write "all" APIs, we should really limit the permissions what any individual workflow or job can do.

This commit sets the default permissions for each workflow to "contents: read", which allows jobs to only read from the repository.

Link: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions

Jobs that use the GITHUB_TOKEN to perform sensitive actions on behalf of
a real user may be granted a range of permissions. Instead of granting
blanket permissions to read and write "all" APIs, we should really limit
the permissions what any individual workflow or job can do.

This commit sets the default permissions for each workflow to "contents:
read", which allows jobs to only read from the repository.

Link: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
Signed-off-by: Jason Gerecke <[email protected]>
@whot whot merged commit dbb8ddc into linuxwacom:master Nov 30, 2023
9 of 13 checks passed
@whot
Copy link
Member

whot commented Nov 30, 2023

Merging despite the (unrelated) CI failure which is addressed in #329, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants