Skip to content

chore: Set permissions for GitHub actions - #5523

Merged
eddumelendez merged 2 commits into
testcontainers:masterfrom
turrisxyz:Pinned-Dependencies-GitHub
Jul 7, 2022
Merged

eddumelendez merged 2 commits into
testcontainers:masterfrom
turrisxyz:Pinned-Dependencies-GitHub

Conversation

@naveensrinivasan

Copy link
Copy Markdown
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>
@naveensrinivasan
naveensrinivasan requested a review from a team June 30, 2022 00:29
@github-actions github-actions Bot added the github_actions Pull requests that update Github_actions code label Jun 30, 2022
@eddumelendez

eddumelendez commented Jun 30, 2022 •

Copy link
Copy Markdown
Member

@naveensrinivasan thanks for the PR! just one question. do we also need the permission content:read here, right?

@kiview kiview added this to the next milestone Jul 1, 2022
@naveensrinivasan

Copy link
Copy Markdown
Contributor Author

@naveensrinivasan thanks for the PR! just one question. do we also need the permission content:read here, right?

I think so.

@kiview

kiview commented Jul 5, 2022

Copy link
Copy Markdown
Member

@naveensrinivasan Would you also like to contribute this change, so we have everything together in this PR? 🙂

@naveensrinivasan

Copy link
Copy Markdown
Contributor Author

@naveensrinivasan Would you also like to contribute this change, so we have everything together in this PR? 🙂

Apologies I won’t be able to do it. Thanks

@eddumelendez
eddumelendez merged commit 3641114 into testcontainers:master Jul 7, 2022
@eddumelendez

Copy link
Copy Markdown
Member

thanks for your contribution @naveensrinivasan ! this is now merged in master branch

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

Labels

github_actions Pull requests that update Github_actions code type/housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants