Skip to content

Say what the rust-toolchain pin is, not a tag that moves under it - #939

Merged
jeremy merged 1 commit into
mainfrom
sdk-pin-comments
Sep 20, 2026
Merged

jeremy merged 1 commit into
mainfrom
sdk-pin-comments

Conversation

@jeremy

@jeremy jeremy commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Main is red on GitHub Actions audit (zizmor), six findings, all ref-version-mismatch, all the same action at the same sha:

uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
                                                                       ^^ tag points to commit 02cb101ec7c4

What actually happened

dtolnay/rust-toolchain publishes exactly one tag — v1 — and moves it. We pinned 6c977a6c on 2026-09-10 in #859, when v1 pointed there. Upstream re-pointed v1 to 02cb101e on 09-12, two days later.

The sha is unchanged and still correct. What went stale is the comment's implicit claim that v1 resolves to it.

Why no machinery caught it

Nothing was neglected — this case falls outside all of it:

  • Dependabot maintains these comments on its own PRs, and hasn't bumped this one: cooldown: default-days: 10, weekly Monday, and the move is 8 days old.
  • dependabot-sync-actions-comments.yml repairs drift after workflow-file pushes. It ran on 09-19 at 5a6bd81 and reported "all action pin comments are in sync" — correctly, by its own question, which is whether the comment names the tag we pinned from.
  • zizmor asks a different question: does the named tag still resolve to this sha? That went false the moment upstream moved it, with no push on our side.

For an upstream that publishes only a moving tag, a version comment cannot stay true. These six are the only pins of 172 in that position — the other 166 name immutable versions (v4.2.2, v1.321.0, and so on) and are unaffected.

The change

The six comments stop claiming a version and record what was actually pinned, and why there is no version to name.

Why not a zizmor ignore

An inline # zizmor: ignore[ref-version-mismatch] would have matched the 19 ignores already in these workflows, and it was the first instinct. It is worse: it blinds the audit at those six sites permanently, including against a genuine mismatch introduced later. This keeps ref-version-mismatch live everywhere.

Verification

Run locally with the same online audit CI uses:

before after
zizmor 1.30.0 6 medium, exit 13 0 findings, exit 0
actionlint clean clean

No functional change — the sha, and therefore the toolchain every job installs, is untouched.

The sync bot will skip these lines rather than rewrite them: its PIN_LINE_RE requires a v?\d… comment token, which prose does not match. When dependabot eventually bumps the sha it may restore a # v1 comment, which would reintroduce the finding; if that happens the durable answer is the same shape as this one.

Follow-up, tracked separately: whether actions-rust-lang/setup-rust-toolchain (immutable version tags, built-in caching) is a better fit for these six call sites than a minimal rustup wrapper. Evaluating on merits; not a release blocker.


Summary by cubic

Replaces the # v1 comments on six dtolnay/rust-toolchain pins with a note that records the pinned sha and explains that the upstream v1 tag moves, keeping the GitHub Actions audit free of ref-version-mismatch findings. The sha is unchanged, so toolchain versions are unaffected.

Written for commit abe7c42. Summary will update on new commits.

Review in cubic

`dtolnay/rust-toolchain` publishes exactly one tag — `v1` — and moves it.
We pinned 6c977a6c on 2026-09-10 in #859, when v1 pointed there; upstream
re-pointed v1 to 02cb101e two days later. The sha is unchanged and still
correct, but `# v1` had become a claim about a tag that no longer resolves
to it, which is what zizmor's ref-version-mismatch reports.

Nothing was out of sync through neglect. Dependabot maintains these comments
on its own PRs, and dependabot-sync-actions-comments.yml repairs drift after
workflow-file pushes; neither covers an upstream tag move, which happens with
no push on our side and leaves the comment accurate about the tag while making
it wrong about the sha.

A version comment cannot stay true for an upstream that publishes only a
moving tag, so these six stop claiming one. The comment now records what we
actually pinned and when, plus why there is no version to name.

Chosen over a zizmor ignore deliberately: an ignore would blind
ref-version-mismatch at these six sites permanently, including against a
genuine mismatch later. This keeps the audit live everywhere. Verified with
the same online audit CI runs — zizmor 1.30.0 reports 0 findings and exits 0,
against 6 medium and exit 13 before. actionlint clean.

The sync bot skips these lines rather than rewriting them: its PIN_LINE_RE
requires a `v?\d…` comment token, which prose does not match.
Copilot AI balanced review requested due to automatic review settings September 20, 2026 07:26
@github-actions github-actions Bot added the github-actions Pull requests that update GitHub Actions label Sep 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-20T07:28:43.092428Z abe7c42 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/codeql.yml
  • .github/workflows/release-rust.yml
  • .github/workflows/security.yml
  • .github/workflows/test.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

Copilot AI 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.

Copilot review overview

🟢 Approved

The comments accurately describe the immutable pin, avoid bot rewrites, and leave workflow behavior unchanged.

Review effort: Balanced
Findings: None

What changed in this PR

Updates six Rust toolchain action comments to accurately document the immutable SHA without claiming the moving v1 tag.

Changes:

  • Replaces stale # v1 annotations across Rust workflows.
  • Preserves all action SHAs and runtime behavior.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
.github/​workflows/​test.yml Corrects the Rust setup pin comment.
.github/​workflows/​security.yml Corrects the cargo-deny toolchain pin comment.
.github/​workflows/​release-rust.yml Corrects three release toolchain pin comments.
.github/​workflows/​codeql.yml Corrects the CodeQL Rust toolchain pin comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jeremy
jeremy merged commit 139ab66 into main Sep 20, 2026
56 checks passed
@jeremy
jeremy deleted the sdk-pin-comments branch September 20, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github-actions Pull requests that update GitHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants