Add minimum token permissions for all GitHub workflow files #2
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 GitHub workflow files to follow OSSF Scorecard security best practices as outlined in the Token Permissions check documentation.
Changes Made
Added
permissions: contents: readto 12 workflow files that previously had no permissions declared:boost_log.ymlfluentd.ymlgeneva_metrics.ymlgeneva_trace.ymlglog.ymlhttpd.ymllog4cxx.ymlnginx.ymlprometheus.ymlspdlog.ymluser_events.ymlwebserver.ymlAdded job-specific
permissions: contents: writeto thecreate-releaseandupload-release-artifactsjobs innginx.ymlthat usesoftprops/action-gh-release@v2for creating GitHub releasesLeft unchanged workflows that already had appropriate permissions:
fossa.yml- already hadpermissions: contents: readossf-scorecard.yml- kept existingpermissions: read-allas requiredSecurity Benefits
These changes ensure that:
All workflow files remain syntactically valid and functionally equivalent while now following security best practices.
Fixes #1.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.