Add minimum token permissions for all GitHub workflow files #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds minimum token permissions to all 29 GitHub workflow files to improve the repository's security posture according to OpenSSF Scorecard recommendations.
Changes Made
Added root-level
permissions: contents: read
blocks to 26 workflow files that were missing them. The remaining 3 files (fossa.yml
,nightly-release.yaml
, andossf-scorecard.yml
) already had proper root-level permissions defined.Implementation Details
on:
trigger blockupdate-version.yaml
) remain unchangedSecurity Impact
This addresses the Token-Permissions check from the OpenSSF Scorecard by ensuring every workflow has explicitly defined permissions at the root level. Previously, workflows inherited default permissions which could be overly permissive.
The
contents: read
permission provides the minimum access needed for most CI/CD operations like checking out code and reading repository contents, while jobs that need additional permissions (like creating releases or updating PRs) retain their existing job-level permission declarations.Verification
All 29 workflow files now pass permissions compliance checks with zero errors or warnings.
Fixes #45.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.