Harden CI: pin supply-chain.yml actions to commit SHAs - #5276
Conversation
A floating tag resolves at run time, so whoever controls the tag controls what runs in CI. Pin the 13 resolvable action references in supply-chain.yml to full commit SHAs, keeping the human-readable version in a trailing comment so Dependabot can still propose bumps. Digests are the same ones already validated by the ci.yml pinning branch: actions/checkout v7.0.1 actions/setup-python v7.0.0 actions/upload-artifact v7.0.1 github/codeql-action/upload-sarif is deliberately left on its tag: an open Dependabot PR is bumping codeql-action from 3 to 4, and pinning it here would conflict with that bump. Only `uses:` values change -- the parsed YAML is otherwise identical, and no permissions block is touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LHL2XjNoJMscqDHfYNmVWs
✅ Drift Bot (ClawMetry): no drift detectedDrift Bot analyzed the changed files against this project's blueprints and requirements and found no drift. |
|
E2E Gate (required) is red, and it is not this PR's failure. Recording the evidence rather than pushing anything, since there is nothing in this diff to fix. What failed: All 11 other required checks it aggregates reported green before the deadline (OSS golden path, Cross-repo handoff, MOAT Keystone, MOAT Verifier, E2E Browser Tests, Syntax & Lint, API Tests ×3, pip install ×4, Wheel install, Store invariants, Drift Bot). Why it is not this PR's: three independent reasons.
Is there a fix to port? No. #5274 (merged) touched the C6 gate's comment text and issue refs, not this timeout, and no open PR addresses it. I am deliberately not widening this supply-chain PR to change What I am doing: re-running the gate once, after the CI run finishes, so it re-reads the check states with Generated by Claude Code |
|
Resolved as diagnosed. The single re-run of No code change was needed or made. The standing observation from the previous comment: this gate has now timed out on Generated by Claude Code |
What
Pins the 13 resolvable action references in
.github/workflows/supply-chain.ymlto full commit SHAs, with the human-readable version kept in a trailing comment.actions/checkout(6 refs)3d3c42e5aac5ba805825da76410c181273ba90b1# v7.0.1actions/setup-python(5 refs)5fda3b95a4ea91299a34e894583c3862153e4b97# v7.0.0actions/upload-artifact(2 refs)043fb46d1a93c77aae656e7c1c64a875d1fc6a0a# v7.0.1Why
A floating tag is resolved at run time, so whoever can move the tag decides what executes in CI. A digest cannot be moved. This is the OpenSSF Scorecard
PinnedDependenciesprobe, and it is particularly apt in this file —supply-chain.ymlis the workflow that runs Scorecard, so an unpinned reference here was the workflow failing the check it exists to run.ossf/scorecard-actionin this same job was already pinned for exactly that reason.The trailing
# vX.Y.Zcomment is the form Dependabot reads, so version bumps keep flowing normally.Scope
One concern, one workflow file. 13 insertions, 13 deletions, nothing else.
github/codeql-action/upload-sarif@v3(line 160) is deliberately left on its tag: Dependabot PR #5158 is currently bumpinggithub/codeql-actionfrom 3 to 4, and pinning a v3 digest here would conflict with that bump. It is the only remaining unpinned reference in this file and is best pinned once that bump lands.ci.ymlis not touched — it is covered by the open PR #5275.Verification
python3 -c "import yaml,glob; [yaml.safe_load(open(f)) for f in glob.glob('.github/workflows/*.yml')]"→ 34/34 OKmainwithuses:values masked is identical, confirming only the action references changed.permissions:block is added or modified anywhere, so no job's token scope changes.ci.ymlpinning branch, whose "Action references resolve" check passed green.Risk
Low. Behaviour-neutral by construction — same actions, same versions, addressed by digest instead of tag. This repo's own "Action references resolve" job validates every reference on this PR.
Path is under
.github/, which is exempt from the product-record gate.Generated by Claude Code