ci: set permissions for GitHub actions#7291
ci: set permissions for GitHub actions#7291briandealwis merged 2 commits intoGoogleContainerTools:mainfrom
Conversation
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
|
@neilnaveen this definitely seems like a good change, should we do this on all of our jobs? Or is this only applicable to the one job that you modified? |
1 similar comment
|
@neilnaveen this definitely seems like a good change, should we do this on all of our jobs? Or is this only applicable to the one job that you modified? |
Probably yes, for now I was able to address this one. Thanks |
|
Thanks @neilnaveen for picking this up. @MarlonGamez The other jobs have |
|
@neilnaveen you'll need to sign the CLA |
Co-authored-by: Brian de Alwis <bsd@acm.org>
Codecov Report
@@ Coverage Diff @@
## main #7291 +/- ##
==========================================
- Coverage 70.48% 68.49% -2.00%
==========================================
Files 515 560 +45
Lines 23150 26507 +3357
==========================================
+ Hits 16317 18155 +1838
- Misses 5776 7096 +1320
- Partials 1057 1256 +199
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
…ainerTools#7291) Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.
Signed-off-by: neilnaveen 42328488+neilnaveen@users.noreply.github.com