chore: harden GitHub Actions token permissions#8784
Merged
Conversation
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
chore: harden workflow permissions
chore: harden GitHub Actions token permissions
Jul 17, 2026
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
Copilot created this pull request from a session on behalf of
pethers
July 17, 2026 21:03
View session
pethers
marked this pull request as ready for review
July 17, 2026 21:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens CI/CD security by reducing GitHub Actions GITHUB_TOKEN permissions in documentation/site and release workflows, aligning with least-privilege expectations (e.g., OpenSSF Scorecard findings) while keeping required release/attestation capabilities intact.
Changes:
- Reduce
contentspermission fromwritetoreadin site and Javadoc generation workflows. - Remove unused write-scopes from the release workflow permissions block (e.g.,
packages,statuses,deployments,security-events).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/site-generation.yml | Narrows repository content access for the Maven site generation job. |
| .github/workflows/javadoc-generation.yml | Narrows repository content access for the Javadoc generation job. |
| .github/workflows/release.yml | Removes several unused GITHUB_TOKEN scopes from the release job permissions. |
Comments suppressed due to low confidence (1)
.github/workflows/javadoc-generation.yml:33
- This job uses
github.rest.issues.createComment(...)to comment on PRs, which requiresissues: write. Currently onlypull-requests: writeis granted, so the PR-comment step is likely to fail. Also,pages: writeandid-token: writeare granted but unused in this workflow (no Pages deploy / attestation steps).
contents: read # Needed for checkout
pages: write # Needed for GitHub Pages deployment
id-token: write # Required for attestation
actions: read # Basic read access to actions
pull-requests: write
| statuses: write # Required for commit statuses updated by actions | ||
| issues: write # Updated to write for release-drafter | ||
| pull-requests: write # Updated to write for release-drafter | ||
| pages: read |
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
|
pethers
approved these changes
Jul 17, 2026
pethers
approved these changes
Jul 17, 2026
pethers
enabled auto-merge (squash)
July 17, 2026 21:26
pethers
disabled auto-merge
July 17, 2026 21:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
Reduces GitHub Actions permissions flagged by OpenSSF Scorecard where workflow steps do not require write access. Required release, attestation, and scheduled-report permissions remain unchanged.
Type of Change
Primary Changes
Political Analysis
Technical Changes
Impact Analysis
Political Analysis Impact
Technical Impact
GITHUB_TOKENscopes.Testing
Documentation
Screenshots
Not applicable.
Related Issues
Checklist
Additional Notes
Permission reductions
contents: write→contents: read.packages,security-events,statuses, anddeploymentswrite scopes.Security Considerations
Release Notes
Reduced GitHub Actions token permissions for documentation, site-generation, and release workflows.