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 permissions for Github workflows #217

Closed
joycebrum opened this issue Feb 23, 2023 · 3 comments
Closed

Set up permissions for Github workflows #217

joycebrum opened this issue Feb 23, 2023 · 3 comments

Comments

@joycebrum
Copy link
Contributor

Hi, I'm from Google working on behalf of the OpenSSF to help open source projects to improve their supply chain security.

I would like to suggest setting 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.

If that's ok for you let me know and I'll submit a PR with the changes. The changes are quite simple so if you'd like I can open the PR and we can discuss on it.

@alex
Copy link
Member

alex commented Feb 23, 2023 via email

@fproulx-boostsecurity
Copy link

@joycebrum thank you ! :) I reported that to OpenSSF Alpha Omega in December.

@joycebrum
Copy link
Contributor Author

Closed by #218

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@alex @joycebrum @fproulx-boostsecurity and others