Skip to content

chore(deps): pin GitHub Actions to commit SHAs so cooldown applies#461

Merged
angel-manuel merged 1 commit into
devfrom
chore/pin-github-actions-shas
Jul 16, 2026
Merged

chore(deps): pin GitHub Actions to commit SHAs so cooldown applies#461
angel-manuel merged 1 commit into
devfrom
chore/pin-github-actions-shas

Conversation

@angel-manuel

Copy link
Copy Markdown
Contributor

Why

D30 gates dependency bumps behind a 7-day cooldown — but for GitHub Actions that gate was inert.

Every uses: in this repo referenced a floating major tag (actions/checkout@v7, dtolnay/rust-toolchain@stable, …). A major tag is a mutable pointer GitHub re-resolves at CI runtime, and Dependabot only opens a PR when it sees a new version — it proposes nothing when the tag itself moves underneath us. So a re-pointed or compromised tag reached CI on the next run with no PR, no review, and no 7-day delay: precisely the window D30 exists to close.

Mirrors overfolder's 2026-07-13 decision. Recorded here as D31.

What

  • Pinned all 37 third-party refs across ci.yml, release.yml, release-please.yml to 40-char SHAs with a # vX.Y.Z comment. Dependabot maintains the SHA + comment, so cooldown now gates every Actions bump like cargo/npm. The 3 local ./.github/actions/seed-ort-cache path refs are unpinnable and left as-is.
  • dependabot.yml: added the open-pull-requests-limit: 10 the github-actions block was missing (cargo/npm already had it), plus the rationale comment.
  • DECISIONS.md: D31. TECH_DEBT.md: the two branch-tracking pins (below).

Every pin is ≥7 days old, so adoption itself respects the cooldown window. Shared actions reuse overfolder's exact pins to keep the repos in lockstep.

Action Pin
actions/checkout 9c091bb2 # v7.0.0
actions/setup-node 48b55a01 # v6.4.0
actions/upload-artifact 043fb46d # v7.0.1
actions/download-artifact 3e5f45b2 # v8.0.1
dtolnay/rust-toolchain 4be7066a # stable branch
Swatinem/rust-cache c1937114 # v2.9.1
taiki-e/install-action 4684b840 # v2.82.9
dorny/paths-filter 7b450fff # v4.0.2
codecov/codecov-action fb8b3582 # v7.0.0
rui314/setup-mold 9c9c13bf # v1 (mutable tag)
opentofu/setup-opentofu a1320f89 # v2.0.2
googleapis/release-please-action 45996ed1 # v5.0.0
softprops/action-gh-release 718ea10b # v3.0.1

Two versions are deliberately not latest, held by the 7-day rule — Dependabot will propose them once they age in:

  • action-gh-release → v3.0.1, not v3.0.2 (published 3 days ago)
  • install-action → v2.82.9, not v2.83.2 (published 4 days ago)

Obsoletes #457

#457 bumps taiki-e/install-action v2 → v2.82.9 — tag-to-tag, still mutable. This PR lands the same version as an immutable SHA, so #457 is redundant. Closing it once this merges (overfolder did the same with its #491).

New tech debt

dtolnay/rust-toolchain@stable and rui314/setup-mold@v1 pin branches, not release tags (setup-mold publishes no semver releases at all). Dependabot tracks tags/releases, so it won't bump either. Runtime behavior is unaffected — rustup still resolves stable, mold still installs — only the action code is frozen. Ideal fix is a periodic manual re-pin; logged in TECH_DEBT.md.

Verification

  • ✅ No mutable refs remain: every uses: outside ./.github/actions/ is a 40-char SHA (37 pinned + 3 local).
  • ✅ Every SHA resolves upstream via gh api, and every # vX.Y.Z comment was checked to match the tag's actual commit (annotated tags dereferenced). A wrong comment is worse than none — Dependabot reads it.
  • ✅ Every pin's commit date is ≤ 2026-07-09 (≥7 days old).
  • ✅ All five workflow/action YAML files parse; dependabot.yml confirmed to have limit + cooldown on all three ecosystems.
  • CI is the real test — this run exercises checkout, setup-node, rust-toolchain, rust-cache, install-action, setup-mold, paths-filter, codecov, and setup-opentofu under the new pins. A bad pin fails fast at step resolution.
  • ⚠️ release.yml / release-please.yml don't run on PRs, so action-gh-release, release-please-action, and the artifact up/downloads are verified by inspection only (SHA resolution + tag match), not by execution.

No CI enforcement step (zizmor/pinact) — overfolder enforces by convention + Dependabot maintenance only; adding a linter is a separate decision.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UpS2MLgHnfp9bMP1uR127X

D30 gates dependency bumps behind a 7-day cooldown, but for GitHub Actions
that gate was inert: every `uses:` referenced a floating major tag, which is
a mutable pointer GitHub re-resolves at CI runtime. Dependabot only opens a
PR when it sees a new version, so a re-pointed or compromised tag reached CI
on the next run with no PR, no review, and no delay.

Pin all 37 third-party refs to 40-char commit SHAs with a `# vX.Y.Z` comment
(the 3 local `./.github/actions/*` path refs stay as-is). Dependabot now
maintains the SHA + comment, so the existing cooldown gates every Actions
bump like it does cargo/npm.

Pins are all >=7 days old, so adoption itself respects the window; shared
actions reuse overfolder's exact pins to keep the repos in lockstep. Mirrors
overfolder's 2026-07-13 decision. Also adds the `open-pull-requests-limit: 10`
the github-actions block was missing.

Obsoletes #457 (install-action v2 -> v2.82.9, tag-to-tag): this lands the
same version as an immutable SHA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpS2MLgHnfp9bMP1uR127X
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
overslash Ready Ready Preview, Comment Jul 16, 2026 8:59am

Request Review

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@angel-manuel
angel-manuel merged commit 3ca56eb into dev Jul 16, 2026
15 checks passed
@angel-manuel
angel-manuel deleted the chore/pin-github-actions-shas branch July 16, 2026 09:34
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