ci: pin remaining GitHub Actions to commit SHAs - #287
Conversation
`ci.yml` referenced three actions by mutable tag, while `release-binaries.yaml` already pins the same actions by commit SHA: actions-rust-lang/setup-rust-toolchain@v1 (5 uses) taiki-e/install-action@v2 (2 uses) foundry-rs/foundry-toolchain@v1 (4 uses) A moved tag or a compromised upstream action would execute arbitrary code in CI. Pinning to a SHA makes the supply chain immutable and brings this workflow in line with the convention already used elsewhere in the repo. Each pin resolves to the tag that `@v1`/`@v2` currently point at, so CI behaviour is unchanged: setup-rust-toolchain 166cdcfd11aee3cb47222f9ddb555ce30ddb9659 v1.17.0 install-action a2a5f6e99e1a31540baa0468acfa302cff0f359f v2.86.4 foundry-toolchain 908c540300062bd5a7e473851cdb4282204cee09 v1.9.1 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Verified the three SHA↔tag mappings independently against the upstream repos — all correct:
Each SHA is the real tagged commit in the genuine upstream repository (not a fork), so there's no impersonation risk in the pins themselves. Coverage check: I scanned every One nuance on the "Behaviour: unchanged" claim: it holds exactly for two of the three — the floating Two adjacent observations, in case maintainers want follow-ups (fine to keep out of this PR's scope):
LGTM — small, mechanical, verifiable line-by-line, and consistent with the StepSecurity checks the repo already enforces (SHA pinning is their top recommendation). |
Summary
ci.ymlreferenced three actions by mutable tag, whilerelease-binaries.yamlalready pins the same actions by commit SHA. This bringsci.ymlin line with that existing convention.actions-rust-lang/setup-rust-toolchain@v1166cdcfd…(v1.17.0)taiki-e/install-action@v2a2a5f6e9…(v2.86.4)foundry-rs/foundry-toolchain@v1908c5403…(v1.9.1)Why
A mutable tag can be force-moved, and a compromised upstream action would execute arbitrary code in CI. SHA pinning makes the supply chain immutable. This is the practice
release-binaries.yamlalready follows:Behaviour
Unchanged. Each SHA is the commit that the corresponding
@v1/@v2tag currently resolves to, so CI runs exactly the same action versions as before. The# vX.Y.Ztrailing comments follow the existing convention so future bumps stay readable.Noticed while doing a general review of the repository.
🤖 Generated with Claude Code