chore(ci): add top-level permissions: read-all to workflows (RAN-46 AC)#90
Merged
Conversation
Closes one of the audit gaps from RAN-46 AC #2 ("Workflow permissions: default to read-all, scoped up per job") + Scorecard Token-Permissions finding. Before: - ci-java.yml had no permissions declaration anywhere — relied on repo-default GITHUB_TOKEN scope (which can be write-all on older repos). - beta-java.yml + release-java.yml only had job-level scopes; missing the explicit top-level read-all that Scorecard checks for. After: - All three workflows declare `permissions: read-all` at the top level. - ci-java.yml's build job now declares `contents: read` explicitly (no other scopes needed — Sonar uses SONAR_TOKEN, not GITHUB_TOKEN). - beta-java.yml and release-java.yml keep their existing job-level `contents: write` (and `packages: write` for beta) which override the top-level for the deploy/tag steps. Audit confirmation (orthogonal to the (A)/(B) security-stack ruling still pending on RAN-46): - All `uses:` SHA-pinned across all 4 workflows (Pinned-Dependencies) - No pull_request_target anywhere (Dangerous-Workflow) - scorecard.yml already had `permissions: read-all` at top level
|
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.



Summary
Closes one audit gap from RAN-46 AC #2 ("Workflow
permissions:default toread-all, scoped up per job") + ScorecardToken-Permissionsfinding. Orthogonal to the still-pending (A) ratify-shipped vs (B) revert-to-OSS-CLI ruling on RAN-46.Diff (8 lines added across 3 files)
ci-java.yml— adds top-levelpermissions: read-all; build job now declarescontents: readexplicitly. Sonar continues to useSONAR_TOKEN(notGITHUB_TOKEN).beta-java.yml— adds top-levelpermissions: read-all; existing job-levelcontents: write+packages: writeoverride for deploy/tag steps.release-java.yml— adds top-levelpermissions: read-all; existing job-levelcontents: writeoverrides for the GPG-signed release commit/tag push.Audit confirmation (orthogonal to (A)/(B))
uses:SHA-pinned across all 4 workflows (ScorecardPinned-Dependencies)pull_request_targetanywhere (ScorecardDangerous-Workflow)scorecard.ymlalready had top-levelpermissions: read-allTest plan
6105dcfuses:lines untouched (no SHA churn)🤖 Generated with Claude Code