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

CI: Restrict default permissions on GitHub Actions workflows #4942

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

echoix
Copy link
Member

@echoix echoix commented Jan 11, 2025

This PR makes some fixes to the new security issues found by CodeQL for the actions (GitHub Actions) language, added in #4940.

I searched for the needed permissions as much as I could find, and I tested this PR as much as I could, even using my default branch. Why I say as much as I could? Well, my fork is a fork, and it is not in an organization, and I do not know exactly the remaining settings that are applied, but I still changed my actions settings (https://github.com/OSGeo/grass/settings/actions) to "Read repository contents and packages permissions", which is the new default for new repos after some date in 2023.
image

I suggest changing our settings to that, if possible (cc @neteler or @wenzeslaus). For organizations, it might be different, and I hope it isn't only possible at the org-level.

@github-actions github-actions bot added the CI Continuous integration label Jan 11, 2025
@@ -31,6 +31,7 @@ jobs:
language:
- c-cpp
- python
- actions
Copy link
Member Author

Choose a reason for hiding this comment

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

This is from the commit of #4940. We should either merge #4940 (and see the new security issues), then update this PR, or, remove it from this PR (thus losing the way to verify that the issue isn't there anymore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant