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 to ci.yml #1507

Closed
joycebrum opened this issue Mar 1, 2023 · 0 comments · Fixed by #1508
Closed

Set up permissions to ci.yml #1507

joycebrum opened this issue Mar 1, 2023 · 0 comments · Fixed by #1508

Comments

@joycebrum
Copy link
Contributor

Hi, I'm from Google and I'm working with the OpenSSF to improve the supply chain security in many open source projects.

One possible (and quite simple) supply chain security change that can be adopted by jna is to set the permissions to GITHUB_TOKEN in order to limit the permission granted.

This is important because, by default, github grants all workflows write-all access which could be exploit by an attacker in case of a compromised workflow. Thus, it is a good practice recommended both by the OpenSSF Scorecard and the Github itself to always use credentials that are minimally scoped.

This means setting the top level permission as contents: read (usually enough to most actions) or even read-all, and grant any write permission at the job level

I will suggest a PR to this issue just to show what the change is about. Feel free to reach me out in case of questions or concerns about this.

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