Repository navigation
ci: scope PR title workflow tokens and pin actions to commit SHAs - #640
julianrubino wants to merge 2 commits into
Conversation
|
@codex review |
|
bugbot run |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
bugbot run |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 73b0044. Configure here.
What
Both PR title workflows get an explicit top-level
permissions:block and their action pinned to a commit SHA:pr-labeler.yaml:contents: read,pull-requests: write;ytanikin/pr-conventional-commitspinned to8267db1bacc237419f9ed0228bb9d94e94271a1d(tag1.4.1).semantic-pr.yaml:pull-requests: read;amannn/action-semantic-pull-requestpinned toe32d7e603df1aa1ba07e981f2a23455dee596825(whatv5resolves to today, same SHA the current runs download).Why
Part of the zeta-chain GitHub Actions hardening. Both workflows run with whatever the org default token grants, which today is write on everything (job logs 126180957933 and 144590615614). pr-labeler uses
add_label: true, so it needspull-requests: write; semantic-pr only reads the PR title. Declaring that now drops every other write scope and keeps both checks working once the org default workflow token goes read-only.A tag can be moved to different code; a commit SHA cannot.
Checked on this PR
pr-labeler run on d89685a (job 144590613440): passed, token block
Contents: read,Metadata: read,PullRequests: write, action downloaded at8267db1b, and theCIlabel was added. Semantic PR run on 73b0044 (run 47200831864): passed, token blockMetadata: read,PullRequests: read, action downloaded ate32d7e60.Risk
Same action code, same triggers. Fork PRs already get a read-only token, so they behave as today.
Rollback
Revert.
Note
Low Risk
CI-only workflow configuration with least-privilege permissions and SHA-pinned actions; no application or runtime behavior changes.
Overview
Hardens the two PR title validation workflows by declaring explicit job token scopes and pinning third-party actions to immutable commit SHAs instead of movable tags.
pr-labeler.yamlnow requestscontents: readandpull-requests: write(for labeling) and pinsytanikin/pr-conventional-commitsto8267db1b….semantic-pr.yamllimits access topull-requests: readand pinsamannn/action-semantic-pull-requesttoe32d7e60…. Behavior stays the same; default broad write permissions are dropped ahead of org-wide read-only workflow tokens.Reviewed by Cursor Bugbot for commit 73b0044. Configure here.