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: restrict permissions in release workflow #5660

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

sashashura
Copy link
Contributor

@sashashura sashashura commented Sep 19, 2022

This PR adds explicit permissions section to workflows. This is a security best practice because by default workflows run with extended set of permissions (except from on: pull_request from external forks). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an injection or compromised third party tool or action) is restricted.
It is recommended to have most strict permissions on the top level and grant write permissions on job level case by case.

RELEASE NOTES: n/a

@dfawley dfawley added the Type: Meta Github repo, process, etc label Sep 20, 2022
@dfawley dfawley added this to the 1.50 Release milestone Sep 20, 2022
@dfawley dfawley requested a review from easwars September 20, 2022 16:46
@dfawley dfawley changed the title GitHub Workflows security hardening GitHub: restrict permissions in release workflow Sep 20, 2022
@dfawley dfawley requested review from zasweq and removed request for easwars September 21, 2022 16:46
@dfawley
Copy link
Member

dfawley commented Sep 21, 2022

@zasweq, @easwars seems to have a lot on his plate right now; would you mind doing the second pass review of this?

Copy link
Contributor

@zasweq zasweq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@zasweq zasweq assigned sashashura and unassigned zasweq Sep 27, 2022
@zasweq zasweq merged commit e8866a8 into grpc:master Sep 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Meta Github repo, process, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants