Skip to content

Conversation

@neilnaveen
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: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
@eregon
Copy link
Member

eregon commented May 26, 2022

I don't see the point, to attack one would need permissions to create a release, if an attacker has that all bets are off anyway.

@eregon eregon closed this May 26, 2022
@eregon
Copy link
Member

eregon commented Jul 27, 2022

Upon reading more about this, I think it is useful (actions/checkout#485 (comment)), I'll merge this, thanks for the PR.
It is unfortunate that none of the links above really explains the issues/threats clearly.

@eregon eregon reopened this Jul 27, 2022
@eregon eregon merged commit 3325fe2 into ruby:master Jul 27, 2022
@eregon
Copy link
Member

eregon commented Jul 29, 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