Skip to content

Add Recommended Permissions #665

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add Recommended Permissions #665

wants to merge 1 commit into from

Conversation

KyFaSt
Copy link

@KyFaSt KyFaSt commented Jan 22, 2025

To reduce risk of over-privileged tokens, we are adding recommended permissions to popular GitHub-owned Actions READMEs. Please confirm these permissions are correct and merge the change. Thank you!

To reduce risk of over-privileged tokens, we are adding recommended permissions to popular GitHub-owned Actions READMEs
@KyFaSt KyFaSt requested a review from a team as a code owner January 22, 2025 02:29

# Recommended Permissions

The `actions/upload-artifact` workflow relies on an internal authentication pattern and does not use the GITHUB_TOKEN, to reduce risk of over-privileged token, jobs that use `actions/upload-artifact` should set permissions to none:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same feedback as cache and download-artifact - actions/download-artifact#373 (comment)

Copy link

Choose a reason for hiding this comment

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

I think best practice is to set permissions at the top to minimal (none or contents: read for example), and then add permissions needed in each job.

See the wording in "remediation steps" for example on the ossf scorecard: https://github.com/ossf/scorecard/blob/7ce8609469289d5f3b1bf5ee3122f42b4e3054fb/docs/checks.md#token-permissions

Agreed that the proposed wording without links to more detailed documentation might break things for people.

Some docs explaining the permissions required would be good, and pointers to more detailed documentation.

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.

3 participants