chore: pin third-party GitHub Actions to commit SHAs - #2302
Open
0xrlawrence wants to merge 1 commit into
Open
Conversation
Every third-party action was referenced by a mutable tag. A tag can be repointed at any commit by whoever owns the action, so a compromised upstream would execute in workflows that hold repository secrets -- docker/login-action and softprops/action-gh-release both run alongside credentials, and tailscale/github-action receives OAuth secrets. Pin each to the commit the tag currently resolves to, keeping the version in a trailing comment so Dependabot can still propose updates. actions/checkout@v2 in lint-contracts.yml is also moved to v4 as part of the same pass; it is used with no inputs, so the bump is a drop-in. The first-party yetanotherco/actions reusable workflows are left on tags. Not addressed here: actions-rs/toolchain is archived upstream and no longer maintained. It is pinned like the rest, but migrating to dtolnay/rust-toolchain changes the input surface, so it is better done on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Every third-party action in
.github/workflows/was referenced by a mutable tag. Whoever owns an action can repoint its tag at any commit, so a compromised upstream would execute inside workflows that hold repository secrets —docker/login-actionandsoftprops/action-gh-releaseboth run alongside credentials, andtailscale/github-actionreceives OAuth secrets directly.Each is pinned to the commit its tag currently resolves to, with the version kept in a trailing comment so Dependabot can still propose updates:
actions/checkout@v2inlint-contracts.ymlis also moved to v4 in the same pass. It is used with no inputs, so the bump is a drop-in.The first-party
yetanotherco/actionsreusable workflows are left on tags — that is your own org, and pinning them is your call rather than mine.Not addressed here:
actions-rs/toolchainis archived upstream and unmaintained. It is pinned like the rest so this PR stays mechanical, but migrating todtolnay/rust-toolchainchanges the input surface and deserves its own PR. Happy to open that separately.Type of change
Checklist
testnet, everything else tostagingEvery workflow file was re-parsed as YAML after the rewrite. Only
uses:values changed — no structural edits.