Add minimum token permissions for all GitHub workflow files #4
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 addresses the OSSF Scorecard requirement for minimum token permissions in GitHub workflows.
Analysis Results
After thorough analysis of all 18 GitHub workflow files in
.github/workflows/
, I found that all workflows already have the correct minimum token permissions configured. No changes were required.Current State - All Requirements Met ✅
Top-level permissions correctly configured:
Files with
permissions: contents: read
(minimal default):Files with specific permissions for their function:
permissions: pull-requests: write
(for PR comments)permissions: issues: write, pull-requests: write
(for stale issue management)permissions: id-token: write, contents: read
(for AWS OIDC authentication)Files with
permissions: read-all
(preserved as instructed):read-all
as per requirements)Job-specific permissions correctly configured:
analyze
job hassecurity-events: write
for SARIF uploadanalysis
job hassecurity-events: write, id-token: write
create-release
andbuild-layer
jobs havecontents: write
for GitHub releasesOSSF Scorecard Compliance ✅
All requirements from the OSSF Scorecard Token Permissions check are satisfied:
permissions:
blockpermissions: contents: read
instead ofpermissions: read-all
(except where already using read-all)contents: read
in job-specific blocks (repos are public)Result: No code changes required - the repository already fully complies with minimum token permissions best practices.
Fixes #3.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.