Set up permissions for GitHub Workflows
- Dominant language
- Java
- Stars
- 253
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I work for Google and the OpenSSF to help open source projects to increase their supply-chain security.
One aspect of supply-chain security checked by the [OpenSSF Scorecard](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and also strongly recommended by the [GitHub Security](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions) is to always use credentials that are minimally scoped.
Thus, setting [top level](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) permissions to `contents: read` and all write permissions being granted on run level is a simple but important practice regarding GitHub Workflows.
I'll suggest a PR with the permissions changes so let me know if you have any doubts or concerns.
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect the repository's GitHub Workflow files and compare their current permissions with the GitHub Actions permissions guidance linked in the issue. Set top-level permissions to contents: read and grant write permissions only at the run level where required; done means all workflows follow this least-privilege pattern and still run successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100