-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
ci: Update GitHub Actions workflows to follow principle of least privilege #87254
Conversation
e813675
to
8b00760
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kartben
+1
No complaints from me
8b00760
to
71e8060
Compare
71e8060
to
e1df96c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a couple of unintended changes here
e1df96c
to
e973242
Compare
Sigh -- thanks! Should be better now |
@@ -15,6 +15,9 @@ on: | |||
# Run at 17:00 UTC on every Saturday | |||
- cron: '0 17 * * 6' | |||
|
|||
permissions: | |||
contents: read | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this action have checks: write
permissions in 'Publish Unit Test Results' section below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! thanks for paying attention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nashif addressed - thanks!
…ilege Default to `permissions: read-all` in all workflows and then add additional permissions as needed at the job level Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
e973242
to
ed9c558
Compare
Default to only giving
contents: read
permission in all workflows and then add additional permissions as needed at the job level.This shall get us a 10/10 for the Token-Permissions category in the OpenSSF score card :)
Note for reviewers, actions/upload-artifact actions/download-artifact are apparently "special" and don't require extra permissions.