ci: declare contents:read on Deploy Agent CI workflow#1949
Open
arpitjain099 wants to merge 1 commit into
Open
Conversation
The Deploy Agent CI workflow only runs tox over a Python matrix. No GitHub API write, no cache. `permissions: contents: read` makes that explicit and matches the per-job permissions blocks already used in codeql-analysis.yml and labeler.yml. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
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.
The
Deploy Agent CIworkflow currently doesn't declare apermissions:block, so the workflowGITHUB_TOKENfalls back to whatever the repository default grants. The singlebuildjob only runsactions/checkout,actions/setup-python,pip install tox tox-gh-actions, andtox -v. No GitHub API write, no cache plumbing.This patch sets
permissions: contents: readat workflow scope, matching the per-job permission blocks already declared bycodeql-analysis.yml(actions: read, contents: read, security-events: write) andlabeler.yml.Third-party action exposure:
actions/checkout,actions/setup-python. Both are first-party fromactions/*, so the defense-in-depth argument here is less strong than for repos heavy on third-party actions, but the cost of pinning the scope is one line and the benefit (Token-Permissions check passing, scope contract documented in-file) is real.maven.ymlis deliberately out of scope because it usescache: 'maven'insetup-java, which interacts with the cache-save path; that deserves a separate look.pre-commit.ymlis 16 lines and below the noise floor.