Skip to content

Conversation

@naveensrinivasan
Copy link
Contributor

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 [email protected]

 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-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/)

Signed-off-by: naveensrinivasan <[email protected]>
@naveensrinivasan naveensrinivasan changed the title Set permissions for GitHub actions chore: Set permissions for GitHub actions Apr 12, 2022
@fgreinacher fgreinacher self-requested a review April 24, 2022 11:59
Copy link
Contributor

@fgreinacher fgreinacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, I didn't know about this feature!

@github-actions
Copy link

This is addressed in release v16.1.26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released Issues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants