-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set top level permission to remaining workflows (#13385)
Motivation: Setting minimum permissions on workflow's top level is good practice. Similar changes were previously discussed in #12462. Since some workflows were left out of the previous PR, this PR is a small update to restrict their permissions. Modification: Set top level read only permission to `ci-deploy.yml`, `ci-pr.yml`, `ci-release.yml` and `ci-release5.yml` I wasn't able to test the workflows: - `ci-release.yml` and `ci-release5.yml`: although I wasn't able to test successfully, considering that they are basically using personalized secrets and not the standard GITHUB_TOKEN (github.token), I've considered that no write permission would be needed to it. To avoid errors I've opted for `read-all` instead of `contents: read`. - `ci-deploy.yml` also seems to not be working so I wasn't able to provide a success example either. - `ci-pr.yml` run example https://github.com/joycebrum/netty/actions/runs/4994205584. Not sure why it didn't run on my fork but the errors seems not to be related to any permission. Anyway, I've changed the permission to read-all which certainly will be enough since it runs on pull request (which will always be no more than read-all to external PRs). Result: Similar change discussed at #12462: since github workflow default behavior is to grant write all permission to any workflow it is both a recommendation from [OpenSSF Scorecard](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and the [Github](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions) to always use credentials that are minimally scoped. --------- Signed-off-by: Joyce <joycebrum@google.com>
- Loading branch information
1 parent
b885188
commit 1c1cecb
Showing
5 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters