chore: pin all github actions to commit SHAs#323
Conversation
Replaces every uses: org/action@tag with uses: org/action@<sha> # tag. Tags are mutable; SHAs are not. Blocks tag-mutation supply-chain attacks. Paired with renovate pinDigests: true (already configured) to keep SHAs current.
📝 WalkthroughWalkthroughSix GitHub Actions CI/CD workflow files replace floating major or minor version tags with pinned commit SHAs, securing the release and test pipeline against unexpected action updates. ChangesGitHub Actions version pinning across CI/CD workflows
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 zizmor (1.25.2).github/workflows/ci.ymlINFO zizmor: 🌈 zizmor v1.25.2 ... [truncated 39118 characters] ... } .github/workflows/codeql.ymlINFO zizmor: 🌈 zizmor v1.25.2 .github/workflows/docker-publish.ymlINFO zizmor: 🌈 zizmor v1.25.2 ... [truncated 1319 characters] ... web"
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/codeql.yml:
- Line 25: The workflow uses github/codeql-action pinned to the wrong commit:
replace the incorrect SHA 9e0d7b8d25671d64c341c19c0152d693099fb5ba with the
correct SHA f25eda876ebb741d872b63b9f2c6dfdd77f14b83 for all three occurrences
of github/codeql-action (the steps referencing the v4.35.5 release);
alternatively ensure the tag and its pinned SHA match by updating the action
version to the tag that corresponds to the existing SHA.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 169086cb-dbb1-4002-9432-9a838ef305ff
📒 Files selected for processing (6)
.github/workflows/ci.yml.github/workflows/codeql.yml.github/workflows/dependency-health.yml.github/workflows/docker-publish.yml.github/workflows/release.yml.github/workflows/winget-scripts-test.yml
* docs: refresh README + CONTRIB for features landed on main since #304 Document main-branch features merged after the last README content update (#304, 2026-05-11): - Frictionless join (#369/#380): nickname gate is now conditional; auto-named guests with rename affordance; per-event toggle + per-DJ account default - Pre-built GHCR images + deploy-ghcr.sh no-build deploy path (#318) - Split collection/live event codes; public endpoints never expose the internal event id (#324/#382) - Broaden supply-chain note: GitHub Actions pinned to commit SHAs, committed uv.lock at CVE-floor versions (#322/#323) - Add LISTENBRAINZ_USER_TOKEN to the env block CONTRIB drift fixes: Node 20 -> 22, coverage 70% -> 85%, add 10 missing live env vars, complete the conftest fixture list, fix the BRIDGE_API_KEY description, add the dual-code resolver pitfall. Deliberately excludes the provider-agnostic LLM gateway epic, which lives on epic/ai-engine and is not yet merged to main. * docs: correct supply-chain claim — only bridge image pins base SHA CodeRabbit flagged the 'pinned base-image SHAs' claim as overbroad. Verified: server/Dockerfile (python:3.11-slim) and dashboard/Dockerfile (node:26-alpine) use floating tags for multi-arch; only bridge/Dockerfile pins a SHA256 digest. Reword to the actually-true mitigations: Actions SHA-pinning, committed lockfiles, CI scans (bandit/pip-audit/npm audit), and the bridge base-image digest pin.
Every
uses:reference pinned to 40-char SHA. Tag preserved as trailing comment.WrzDJ has 6 workflows (
ci,codeql,dependency-health,docker-publish,release,winget-scripts-test).Why
Tags (
@v6,@v4) are mutable. A compromised maintainer or hijacked org can re-point a tag to malicious code, silently affecting every workflow run. SHAs are immutable — pinning to a SHA freezes the action contents.What pinact did
@vX/@vX.Ytag to its current commit SHA.# v4-># v4.2.2) to the precise published semver.uses:lines. No script changes (verified onwinget-scripts-test.ymlwhich has PowerShellInvoke-WebRequestcalls — those are untouched).Pinned action count
16 unique
uses:references, spanning:actions/{checkout,setup-python,setup-node,upload-artifact,download-artifact}codecov/codecov-actiondocker/{setup-qemu,setup-buildx,login,metadata,build-push}-actiongithub/codeql-action/{init,autobuild,analyze}softprops/action-gh-releaseMaintenance
Renovate
pinDigests: trueis already configured, so future tag bumps will keep digests in sync automatically.Test plan
Summary by CodeRabbit