Skip to content

CI: Set minimal permissions for GITHUB_TOKEN - #562

Merged
victorlin merged 2 commits into
masterfrom
victorlin/update-workflow-permissions
Nov 19, 2026
Merged

victorlin merged 2 commits into
masterfrom
victorlin/update-workflow-permissions

Conversation

@victorlin

Copy link
Copy Markdown
Member

Self-documenting and safe.

Checklist

  • Checks pass

@victorlin victorlin self-assigned this Nov 18, 2026

@joverlee521 joverlee521 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CI failure due to unrelated issue outside of this PR.

@victorlin
victorlin force-pushed the victorlin/update-workflow-permissions branch from 331c283 to ddac06a Compare November 19, 2026 01:23
Comment on lines +16 to +17
Jobs which use this action should provide to GITHUB_TOKEN the `contents: read`
permission for higher GitHub API rate limits.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added 0fd713b and moved the contents: read to job-specific permissions blocks in force-push.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't think contents: read need to be job specific because it's part of the default permissions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not necessary, but my general approach in https://github.com/nextstrain/private/issues/262 has been to explicitly set permissions wherever the token is used as a self-documenting measure and guard against future changes to defaults.

@victorlin
victorlin merged commit 4af4472 into master Nov 19, 2026
80 of 83 checks passed
@victorlin
victorlin deleted the victorlin/update-workflow-permissions branch November 19, 2026 19:49
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