chore(ci): declare workflow-level permissions on publish.yml#390
Merged
chore(ci): declare workflow-level permissions on publish.yml#390
Conversation
Add `permissions: contents: read` at workflow level so the four build jobs (build-linux, build-macos-arm, build-windows, build-sdist) have explicit GITHUB_TOKEN scoping instead of inheriting from repo defaults. The publish job's per-job `permissions: id-token: write` block remains unchanged. Per-job permissions replace (not merge with) workflow-level, so that job retains only id-token: write (it doesn't checkout, so it doesn't need contents access). Clears 4 CodeQL `actions/missing-workflow-permissions` warnings without changing runtime token scope (repo default was already `read`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Overall Assessment ✅ Looks good No unmitigated P0/P1 findings in the diff. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
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
permissions: contents: readat the workflow level ofpublish.ymlso all jobs have explicit GITHUB_TOKEN scoping.build-linux,build-macos-arm,build-windows,build-sdist) inheritcontents: read, which is what they need foractions/checkout.publishjob's per-jobpermissions: id-token: writeblock is unchanged. Per-job permissions replace (not merge with) workflow-level, so it correctly retains onlyid-token: writefor OIDC trusted publishing — it doesn't checkout, so no contents scope needed.Clears the 4 CodeQL
actions/missing-workflow-permissionswarnings onpublish.ymllines 10/64/94/124 without changing runtime token scope (repo default was alreadyread).Methodology references (required if estimator / math changes)
Validation
yaml.safe_loadparses cleanly.{contents: read}present; publish-job override{id-token: write}retained; 4 build jobs have no per-job override (so they inherit).Security / privacy