Fix minimum token permissions for workflows with git push operations #32
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 requirement to ensure workflows that perform git push operations have appropriate
contents: writepermissions with the correct comment format.Changes Made
Updated
.github/workflows/nginx.ymlto use the standardized comment format forcontents: writepermissions:contents: write # required for creating releases→contents: write # required for pushing changescontents: write # required for uploading release artifacts→contents: write # required for pushing changesAnalysis Summary
After comprehensive analysis of all workflow files, I found:
✅ nginx.yml: Uses
softprops/action-gh-release@v2which creates GitHub releases and uploads artifacts - requirescontents: writepermission (now properly formatted)✅ ossf-scorecard.yml: Only uploads SARIF security scanning results - has correct
security-events: writepermission✅ All other workflows: Perform only read operations (build, test, analyze) and don't require write permissions
The nginx workflow was the only workflow performing git push operations (via the release action), and it already had the correct permissions but with different comment text. This PR standardizes the comments to match the required format.
Fixes #31.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.