Uh oh!
There was an error while loading. Please reload this page.
Restrict permissions for GitHub actions - #2334
Conversation
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. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissionshttps://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissionshttps://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/) Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
gmlewis
commented
Apr 13, 2022
In all the links you provided, I didn't see any need or example for adding |
naveensrinivasan
commented
Apr 13, 2022
This has the https://github.com/styfle/cancel-workflow-action permissions https://github.com/styfle/cancel-workflow-action#advanced-token-permissions HTH.
I don't know. Probably asking the owner of the action would help. |
Codecov Report
@@ Coverage Diff @@## master #2334 +/- ##
=======================================
Coverage 98.04% 98.04% =======================================
Files 118 118 Lines 10458 10458 =======================================
Hits 10254 10254 Misses 140 140 Partials 64 64 Continue to review full report at Codecov.
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @naveensrinivasan - LGTM.
Merging.
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.
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
Signed-off-by: naveensrinivasan 172697+naveensrinivasan@users.noreply.github.com