Skip to content

CI: pin every third-party action to a commit SHA - #86

Merged
danielhanchen merged 1 commit into
masterfrom
ci/pin-third-party-actions
Aug 8, 2026
Merged

danielhanchen merged 1 commit into
masterfrom
ci/pin-third-party-actions

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Pins all 7 third-party actions to immutable commit SHAs, with the version kept as a trailing comment.

Why

A git tag is a mutable pointer. uses: Jimver/[email protected] re-resolves on every run, so if that tag is ever moved -- by the maintainer, or by someone who has taken over the account -- the next prebuild silently executes different code, with full access to the runner that produces the release binaries Studio downloads.

Two of these were on bare major tags (ilammy/msvc-dev-cmd@v1, mshick/add-pr-comment@v2), which by convention move on every minor release, so they were already changing under us.

Worth being specific about the exposure rather than generic: Jimver/cuda-toolkit is a personal user account (210 stars, MIT, actively maintained, but one individual and no organisational backing), and it runs on the CUDA build legs. hendrikmuhs/ccache-action runs on all 9 build legs.

actions/* are GitHub-owned and left on tags, consistent with the rest of the repo.

What changed

action pinned to was
hendrikmuhs/ccache-action d62db5f07c26379fc4b4e0916f098a92573c3b03 v1.2.23
Jimver/cuda-toolkit 3d45d157f327c09c04b50ee6ccdea2d9d017ec76 v0.2.35
ilammy/msvc-dev-cmd 0b201ec74fa43914dc39ae48a89fd1d8cb592756 v1
jlumbroso/free-disk-space 54081f138730dfa15788a46383842cd2f914a1be v1.3.1
mshick/add-pr-comment b8f338c590a895d50bcbfa6c5859251edc8952fc v2
devicons/public-upload-to-imgur 352cf5f2805c692539a96cfe49a09669e6fca88e v2.2.2
Sibz/github-status-action faaa4d96fecf273bd762985e0e7f9f933c774918 v1

17 references across 7 files. The last three are only in bench.yml.disabled, which GitHub does not execute; pinned anyway so it is safe if it is ever re-enabled.

Prebuilt outputs are unaffected

Every SHA is the exact commit its tag pointed at when this PR was written, verified against each upstream repo via the API. Same action code, same inputs, same toolchain -- only the reference is now immutable. Nothing about what gets compiled or packaged changes.

Verification

  • Each SHA confirmed to exist in its repo and to match the named tag.
  • Diff contains 0 non-uses: changed lines (17 insertions, 17 deletions, all uses:). An earlier attempt at this used a regex whose trailing group swallowed adjacent blank lines and comments; it was discarded and redone with a line-scoped edit, and this check is what caught it.
  • All 23 workflow and composite-action files parse.
  • No unpinned third-party action remains anywhere under .github/.

Follow-up

Renovate and Dependabot both understand the @<sha> # <tag> convention and will keep these updated, if you want automated bumps rather than manual ones.

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