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

Set up workflow permissions to least privileges #54

Open
joycebrum opened this issue Mar 13, 2023 · 0 comments · May be fixed by #55
Open

Set up workflow permissions to least privileges #54

joycebrum opened this issue Mar 13, 2023 · 0 comments · May be fixed by #55

Comments

@joycebrum
Copy link

Hi, I work with Google and the OpenSSF to improve supply-chain security on many open source projects.

The supply-chain security improvement I would like to suggest is basically set up the permissions to the github workflows as read only on the top level and any write permission be given at the run level.

This is necessary due to a behavior of github workflow to grant to GITHUB_TOKEN write permissions to all types of permissions, regardless of they being used or not. In case of the workflow getting compromised, an attacker can exploit this permissions.

Thus, it is both a recommendation from OpenSSF Scorecard and the Github to always use credentials that are minimally scoped.

I'll soon submit a PR to show the changes I listed above. Please, feel free to reach me out in case of any doubts or concerns.

@joycebrum joycebrum linked a pull request Mar 13, 2023 that will close this issue
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 a pull request may close this issue.

1 participant