Skip to content

ci: pin every bare actions/*@vN reference to a full commit SHA (BE-5121) - #92

Open
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-5121-pin-actions-sha
Open

ci: pin every bare actions/*@vN reference to a full commit SHA (BE-5121)#92
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-5121-pin-actions-sha

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

ELI-5

GitHub Actions lets you say "run version 6 of the checkout action". But v6 is just a sticky note that whoever owns the action can move to point at different code whenever they like. If someone hostile (or just careless) moves it, our CI silently starts running something else — and because this repo publishes reusable workflows, that change would ride along into every consumer repo that calls them. This PR replaces each sticky note with the exact commit it currently points at, and leaves a # v6 comment so a human can still read which version it is.

What changed

Twenty uses: lines across seven workflow files went from a bare major tag to a full 40-character commit SHA with a trailing version comment. No other change — no logic, no inputs, no permissions.

Action Was Now
actions/checkout @v6 @d23441a48e516b6c34aea4fa41551a30e30af803 # v6
actions/setup-python @v6 @ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
actions/upload-artifact @v7 @043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
actions/download-artifact @v8 @3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
actions/create-github-app-token @v3 @bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
actions/github-script @v9 @3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0

Files: cursor-review.yml, cursor-review-auto-label.yml, agents-md-integrity.yml, assign-prs-to-author.yml, test-cursor-review-scripts.yml, test-agents-md-integrity.yml, test-bump-callers.yml.

Why

AGENTS.md: "Pin everything by full commit SHA, with a trailing # v1 comment — both the uses: in callers and every third-party action here." These seven files were the remaining exceptions. The motivation is the repo's own stated standard plus mutable-tag supply-chain risk — not a failing check: the pinact/zizmor validation consumer repos run inspects the consumer's own caller files, not this reusable workflow's internal action refs, so nothing is red today.

Raised on #91 (#91 (comment)) and deferred there, because pinning only the four lines that PR added would have left cursor-review.yml internally inconsistent while fixing nothing.

How the SHAs were chosen

Every SHA is one this repo already uses elsewhere for the same major version, so the pins are internally consistent rather than newly invented. Each was then independently confirmed against the live tag with gh api repos/actions/<name>/commits/<tag> — both sources agreed on all six. Since each pin resolves to the tip the mutable tag points at today, the same code runs before and after: no behaviour change is expected.

Verification

  • grep -rn 'uses: actions/[a-z-]*@v[0-9]*$' .github/workflows/ → no matches (the ticket's acceptance check).
  • Broader sweep — every uses: line in .github/workflows/ now carries a 40-hex SHA, with one deliberate exception: ci-groom.yml:95, whose @REPLACE_AT_MERGE_WITH_THIS_PRS_SQUASH_SHA placeholder is the documented bump-at-merge marker, not a mutable tag.
  • All four suites green locally: cursor-review scripts (40 tests), agents-md-integrity (18), groom (87), bump-callers (shellcheck clean + 123 assertions).
  • Every workflow file re-parses as YAML.
  • check_agents_md.py --root . passes (its one warning — no CODEOWNERS — pre-exists this change).

Judgment calls

  • Comment version granularity follows in-repo precedent, not one uniform rule. checkout/setup-python/upload-artifact/download-artifact get # v6/# v7/# v8 and create-github-app-token/github-script get # v3.2.0/# v9.0.0, because that is exactly what the existing pinned lines in this repo already say for those SHAs. Uniformity across actions would have meant rewriting lines outside this PR's scope.
  • ci-groom.yml left alone — see above; it is the intentional placeholder, and it is not an actions/* ref.
  • The ticket's per-file counts do not match main. It describes cursor-review.yml as carrying 13 checkout@v6, 2 upload-artifact@v7, 3 download-artifact@v8 and 1 create-github-app-token@v3; the file on main today has 7, 1, 1 and 2 respectively (the counts were taken during the feat(cursor-review): prior-review ledger so re-reviews stop re-litigating answered findings (BE-5109) #91 review and the file has moved since). The acceptance criterion is the grep, which is satisfied — but flagging the discrepancy rather than quietly reconciling it.
  • Not a capability-denying change (no deny/dead-end path, no "unsupported" string), so the negative-claim falsification requirement does not apply.

Risk

The riskiest thing here is a single mistyped SHA, which would fail every affected job loudly and immediately rather than degrade silently. That risk is covered by the two-source check above. Consumers are unaffected either way — they pin this repo by SHA, so nothing changes for them until they bump.

Seven workflow files still referenced first-party actions by mutable major
tag, contrary to the repo rule in AGENTS.md ("Pin everything by full commit
SHA, with a trailing '# vN' comment"). A moved tag silently changes what runs
in CI here and, via the reusable workflows, for every consumer.

Every SHA reuses the pin already present elsewhere in this repo for the same
major version, and each was independently confirmed against the live tag with
'gh api repos/actions/<name>/commits/<tag>'. Same major versions as before, so
no behaviour change is expected.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eb29c627-b4cf-4e1e-bfce-bcefe2119923

📥 Commits

Reviewing files that changed from the base of the PR and between ece4c3e and 7a0c973.

📒 Files selected for processing (7)
  • .github/workflows/agents-md-integrity.yml
  • .github/workflows/assign-prs-to-author.yml
  • .github/workflows/cursor-review-auto-label.yml
  • .github/workflows/cursor-review.yml
  • .github/workflows/test-agents-md-integrity.yml
  • .github/workflows/test-bump-callers.yml
  • .github/workflows/test-cursor-review-scripts.yml

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added agent-coded Authored by the agent-work loop cursor-review Multi-model cursor review labels Jul 29, 2026
@mattmillerai
mattmillerai marked this pull request as ready for review July 29, 2026 16:27

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

✅ No high-signal findings.

Panel: 8/8 reviewers contributed findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded Authored by the agent-work loop cursor-review Multi-model cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants