ci: pin all GitHub Actions to immutable commit SHAs - #144
Merged
richardcase merged 1 commit intoSep 1, 2026
Merged
Conversation
A mutable tag on any action in release.yml can be moved or compromised to run arbitrary code with access to secrets — most notably the Doppler service token that release.yml exchanges for the signing certificate, notarization key, and Homebrew tap credentials. Pin every `uses:` in ci.yml, release.yml, and deploy-site.yml to a reviewed full commit SHA, with a trailing comment recording the version it represents. dtolnay/rust-toolchain@stable has no version tag to pin against — it is pinned to today's tip-of-branch SHA instead, with a comment noting it needs manual re-pinning to pick up future stable Rust releases, since Dependabot cannot track a bare branch ref the way it tracks tagged releases. The existing github-actions Dependabot config already understands SHA-pinned actions and will keep opening upgrade PRs for the rest. Fixes #136
There was a problem hiding this comment.
🟢 Approval recommended
The changes are a low-risk security hardening (action ref pinning) with no functional workflow logic changes detected.
Pull request overview
Pins all third-party GitHub Actions used by clowder’s CI, release, and site-deploy workflows to immutable commit SHAs (with version annotations) to reduce the risk of tag/branch compromise—especially for steps that handle sensitive release credentials.
Changes:
- Replaced every
uses: owner/action@<tag>reference inci.yml,release.yml, anddeploy-site.ymlwith@<40-hex-sha>plus a trailing# <version>comment. - Pinned
dopplerhq/secrets-fetch-action(the release-signing secret fetch path) to thev2.0.0commit SHA. - Pinned
dtolnay/rust-toolchainto a specific commit and annotated it as “stable as of 2026-09-01”.
File summaries
| File | Description |
|---|---|
| .github/workflows/ci.yml | SHA-pins all CI workflow actions (checkout, setup-xcode, rust-toolchain, caching, artifacts, setup-node). |
| .github/workflows/release.yml | SHA-pins all release workflow actions, including Doppler secrets fetch and GitHub release publishing. |
| .github/workflows/deploy-site.yml | SHA-pins site build/deploy actions (checkout, withastro/action, deploy-pages). |
Review details
Suppressed comments (1)
.github/workflows/release.yml:511
- The trailing comment says dtolnay/rust-toolchain has “no version tag”, but upstream does publish a v1 tag; this is really a moving stable branch pin. Rewording avoids leaving incorrect guidance for future maintainers.
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable as of 2026-09-01 — no version tag, so Dependabot can't auto-track this one; re-pin periodically to pick up new stable Rust
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| fetch-depth: 0 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable as of 2026-09-01 — no version tag, so Dependabot can't auto-track this one; re-pin periodically to pick up new stable Rust |
|
|
||
| - name: Install Rust (stable) | ||
| uses: dtolnay/rust-toolchain@stable | ||
| uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable as of 2026-09-01 — no version tag, so Dependabot can't auto-track this one; re-pin periodically to pick up new stable Rust |
richardcase
deleted the
richardcase/pin-the-doppler-secrets-action-to-an-immutable-c
branch
September 1, 2026 08:02
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.
Summary
uses:action reference inci.yml,release.yml, anddeploy-site.ymlto a reviewed full commit SHA, with a trailing comment recording the version it represents.dopplerhq/secrets-fetch-actionwas the specific trigger (issue Pin the Doppler secrets Action to an immutable commit SHA #136): it receives the Doppler service token that unlocks the signing certificate, notarization key, and Homebrew tap credentials, so a moved/compromised tag there is a real credential-exfiltration path. Every other action reference gets the same treatment for the same reason, just lower stakes.dtolnay/rust-toolchain@stablehas no version tag to pin against (it's a channel-tracking branch by design), so it's pinned to today's tip-of-branch SHA with a comment flagging that it needs manual re-pinning to pick up future stable Rust releases — Dependabot can't auto-track a bare branch ref the way it tracks tagged releases..github/dependabot.ymlalready has agithub-actionsecosystem entry; it understands SHA-pinned actions and will keep opening upgrade PRs for everything else, so no Dependabot config changes were needed.Fixes #136
Test plan
python3 -c "import yaml; yaml.safe_load(open('...'))"on all three edited workflow files — valid YAMLgrep -n "uses:" .github/workflows/*.yml— every reference isowner/action@<40-hex-sha> # <version>, no bare tags remain