Skip to content

ci: pin the remaining third-party actions to commit SHAs - #142

Merged
gonzafg2 merged 2 commits into
mainfrom
ci/pin-remaining-actions
Jul 27, 2026
Merged

gonzafg2 merged 2 commits into
mainfrom
ci/pin-remaining-actions

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

claude-code-review.yml already documents the reason, at lines 26-30: an unpinned re-fetch of an action silently regressed the OIDC→app-token exchange on 2026-07-06. That discipline was applied to the action that broke, and to opencode.yml, but the other five workflows kept floating tags.

A floating tag is a mutable reference. The tag owner can move v7 to any commit, and that code then runs with this repo's workflow token — no commit here, no review, no signal. Pinning to a SHA makes the upgrade an explicit, reviewable change.

What changes

Ten uses: across five workflows, nothing else:

Action Pinned to Files
actions/checkout@v7 9c091bb (v7.0.0) ci, audit, deny, interop, claude
Swatinem/rust-cache@v2 e18b497 (v2.9.1) ci, audit, interop
EmbarkStudios/cargo-deny-action@v2 3c63498 (v2.1.1) deny

checkout is pinned to the same SHA opencode.yml already used, so every workflow in the repo now agrees on one version instead of drifting apart. Each pin carries the version as a trailing comment, matching the existing style.

All five files were validated as YAML.

Scope

The two floating tags left in claude-code-review.yml are fixed in #141 and deliberately untouched here, to avoid a conflict between the two branches. Once both land, no workflow in the repo references a mutable tag.

Found while verifying the fix for the finding the opencode reviewer raised on #141 — it only inspected the files in that diff, so the other five workflows were never looked at.

claude-code-review.yml already documents why: an unpinned re-fetch of an action
silently regressed the OIDC→app-token exchange on 2026-07-06. That discipline
was applied to the action that broke, but the rest of the workflows kept
floating tags — a floating tag is a mutable reference, so the code that runs
with the workflow token can change without any commit to this repo.

Pins ten uses across five workflows:
- actions/checkout@v7 -> 9c091bb (v7.0.0), in ci, audit, deny, interop, claude
- Swatinem/rust-cache@v2 -> e18b497 (v2.9.1), in ci, audit, interop
- EmbarkStudios/cargo-deny-action@v2 -> 3c63498 (v2.1.1), in deny

checkout is pinned to the SHA opencode.yml already used, so every workflow now
agrees on one version instead of drifting apart.

The two remaining floating tags in claude-code-review.yml are fixed in #141;
they are left untouched here to avoid a conflict.

Signed-off-by: Gonzalo Fleming <[email protected]>
@opencode-agent

Copy link
Copy Markdown

Now I have the full picture. Here's my review:


Review: ci/pin-remaining-actions (#142)

Classification

CI/workflows — applying the review lens for unpinned actions, supply-chain risk.

Finding (high-signal, >90% confidence)

Wrong SHA for Swatinem/rust-cache — pin does not match the claimed version.

The PR pins Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 with the comment # v2.9.1 across three files (audit.yml:42, ci.yml:97, interop.yml:62). GitHub's API confirms that the v2.9.1 annotated tag resolves to commit c19371144df3bb44fab255c43d04cbc2ab54d1c4, not e18b497. In fact, e18b497 is a commit titled "update changelog, not sure why npm suddenly does not commit this" — it is not attached to any tag at all.

The PR body explicitly states each pin was chosen for a specific tagged release, and the trailing comments assert version correspondence. The pin e18b497 is running an untagged, unversioned commit whose behaviour relative to the claimed v2.9.1 release is unverified.

Impact: The whole point of SHA-pinning is verifiable supply-chain integrity — making the upgrade an explicit, reviewable change. A wrong SHA with a misleading version comment defeats that purpose and could cause confusing divergence when someone later audits these against known-good releases.

Action: Pin to c19371144df3bb44fab255c43d04cbc2ab54d1c4 (the actual v2.9.1 commit) instead, or verify and document that e18b497 is intentional with a valid justification.

The other two pins check out:

  • actions/checkout@9c091bb... — confirmed v7.0.0 commit ✅
  • EmbarkStudios/cargo-deny-action@3c63498... — confirmed v2.1.1 commit ✅

Non-findings

github run

The opencode reviewer caught this on this PR: e18b497 is what the floating `v2`
tag currently points at, not what the `v2.9.1` tag resolves to. It is an
untagged commit ("update changelog, not sure why npm suddenly does not commit
this"), so the trailing `# v2.9.1` comment was asserting something false.

Resolving `v2` and labelling it with the latest release name is exactly the
kind of mismatch SHA-pinning is meant to prevent: the pin was correct as a
reference but unauditable against any published release.

Now pinned to c193711, which is what refs/tags/v2.9.1 dereferences to.

cargo-deny-action was checked the same way and is unaffected: its `v2` and
`v2.1.1` tags happen to point at the same commit (3c63498). actions/checkout
was taken from the SHA already used in opencode.yml, and refs/tags/v7.0.0
confirms it.

Signed-off-by: Gonzalo Fleming <[email protected]>
@opencode-agent

Copy link
Copy Markdown

Here's my review:


Review: ci/pin-remaining-actions (#142)

Classification: CI/workflows — supply-chain hygiene, unpinned-action audit.

Verification

All three pinned SHAs resolve to their claimed versions via GitHub's API:

Action SHA Commit message Version match
actions/checkout 9c091bb "update error wording (#2467)" v7.0.0
Swatinem/rust-cache c1937114 "2.9.1" v2.9.1
EmbarkStudios/cargo-deny-action 3c63498 "Fix use-git-cli deprecation (#116)" v2.1.1

The two commits are clean:

  • 06eb3a4 — ci: pin the remaining third-party actions to commit SHAs (DCO ✅)
  • f511705 — ci: correct the rust-cache pin to the actual v2.9.1 commit (DCO ✅)

The second commit correctly addresses the opencode-agent's finding that the initial pin had the wrong SHA (e18b497 → c1937114). The combined diff now pins all 10 uses: to verified, tagged commits.

Non-findings (no blocking issues)

  • No Rust code changed, no first-party unsafe, no new dependencies. Commitments 1–5 and the threat model are not triggered.
  • dtolnay/rust-toolchain@stable remains floating in all five files — pre-existing, explicitly out of scope per the PR body.
  • The two floating tags in claude-code-review.yml are deferred to ci(review): structured report format and parallel subagents for the reviewers #141 per the PR body — acknowledged scope decision.
  • Conventional Commits format is correct; DCO sign-off present on both commits.
  • Style matches: trailing version comment convention consistent with opencode.yml and claude-code-review.yml.

No findings. LGTM.

github run

@claude

claude Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@gonzafg2
gonzafg2 merged commit 2f437dd into main Jul 27, 2026
11 checks passed
@gonzafg2
gonzafg2 deleted the ci/pin-remaining-actions branch July 27, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant