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

Restrict permissions for GitHub Actions workflows #220

Open
jtherrmann opened this issue Jan 8, 2025 · 0 comments
Open

Restrict permissions for GitHub Actions workflows #220

jtherrmann opened this issue Jan 8, 2025 · 0 comments
Labels
Jira Bug Create a Jira Bug for this issue

Comments

@jtherrmann
Copy link
Contributor

jtherrmann commented Jan 8, 2025

Jira: https://asfdaac.atlassian.net/browse/TOOL-3391

Note: The above link is accessible only to members of ASF.


Since CodeQL scanning was enabled for our repos, we've been getting warnings like:

If a GitHub Actions job or workflow has no explicit permissions set, then the repository permissions are used. Repositories created under organizations inherit the organization permissions. The organizations or repositories created before February 2023 have the default permissions set to read-write. Often these permissions do not adhere to the principle of least privilege and can be reduced [...]

See https://github.com/ASFHyP3/hyp3-sdk/security/code-scanning/16 for the recommended resolution.

Also see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token

Assuming that these permissions can be set in our reusable actions, then that's probably what we should do, otherwise we'll have to set them in the individual workflows.

@jtherrmann jtherrmann added the Jira Bug Create a Jira Bug for this issue label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Bug Create a Jira Bug for this issue
Projects
None yet
Development

No branches or pull requests

1 participant