Skip to content

chore: pin third-party GitHub Actions to commit SHAs - #2302

Open
0xrlawrence wants to merge 1 commit into
yetanotherco:stagingfrom
0xrlawrence:chore/pin-github-actions
Open

chore: pin third-party GitHub Actions to commit SHAs#2302
0xrlawrence wants to merge 1 commit into
yetanotherco:stagingfrom
0xrlawrence:chore/pin-github-actions

Conversation

@0xrlawrence

Copy link
Copy Markdown

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-action and softprops/action-gh-release both run alongside credentials, and tailscale/github-action receives 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:

uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

actions/checkout@v2 in lint-contracts.yml is 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/actions reusable workflows are left on tags — that is your own org, and pinning them is your call rather than mine.

Not addressed here: actions-rs/toolchain is archived upstream and unmaintained. It is pinned like the rest so this PR stays mechanical, but migrating to dtolnay/rust-toolchain changes the input surface and deserves its own PR. Happy to open that separately.

Type of change

  • Bug fix

Checklist

  • “Hotfix” to testnet, everything else to staging

Every workflow file was re-parsed as YAML after the rewrite. Only uses: values changed — no structural edits.

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>
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