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.

- 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: naveen <172697+naveensrinivasan@users.noreply.github.com>
@nedbat
Copy link
Owner

nedbat commented May 3, 2022

This looks good, but I don't understand what the threat model is here? What kind of attack are you thinking of, and how will this stop it? Couldn't they just change the action file?

@nedbat
Copy link
Owner

nedbat commented May 3, 2022

I'd like to understand more about it, but it seems like a fine change, thanks.

@nedbat nedbat merged commit 9ef7d3c into nedbat:master May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants