Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set read-only permission for Github Actions in CI #44

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Apr 5, 2024

This sets the default permission for CI workflows to only be able to read from the repository (scope: contents).

A compromised action will not be able to modify the repo or
even steal secrets since all other permission-scopes are implicit set to "none", i.e. not permitted.

More about permissions and scope can be found here:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

Part of #42 and
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

This sets the default permission for CI workflows to only be able to
read from the repository (scope: "contents").

A compromised action will not be able to modify the repo or even
steal secrets since all other permission-scopes are implicit set to "none",
i.e. not permitted.
More about permissions and scope can be found here:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
@bjosv bjosv requested a review from zuiderkwast April 5, 2024 10:04
@bjosv bjosv merged commit 4312faf into Ericsson:main Apr 5, 2024
5 checks passed
@bjosv bjosv deleted the ci-permissions branch April 5, 2024 12:25
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