ci: pin third-party GitHub Actions to commit SHAs#125
Merged
Conversation
CodeQL (actions/unpinned-tag) flagged docker/setup-buildx-action, docker/login-action, docker/build-push-action, softprops/action-gh-release, and aquasecurity/trivy-action as pinned to mutable version tags. A repointed or hijacked tag would inject arbitrary code into the release workflows, which hold `contents: write` and the Docker Hub credentials (DOCKER_USERNAME/PASSWORD). Pin every third-party action to the commit SHA of its current release across all workflows (not just the ones flagged in PR #107 — also the pre-existing occurrences in release-server.yml and llama-pin-check.yml). The trailing `# vX.Y.Z` comment keeps them readable; the already-configured Dependabot github-actions ecosystem will bump the SHAs going forward. First-party actions/* stay on tags (immutable, not flagged). Clears code-scanning alerts 14, 18, 20, 33, 44-49, 64. Co-Authored-By: Claude Opus 4.8 <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.
What
Pin every third-party GitHub Action to the commit SHA of its current release, across all workflows:
docker/setup-buildx-action@v3@8d2750c…# v3.12.0docker/login-action@v4@c99871d…# v4.3.0docker/build-push-action@v6@10e90e3…# v6.19.2softprops/action-gh-release@v3@718ea10…# v3.0.1aquasecurity/trivy-action@0.35.0@57a97c7…# 0.35.0First-party
actions/*stay on tags (GitHub-owned, immutable, not flagged by CodeQL).Why
CodeQL
actions/unpinned-tagflagged these. A mutable version tag can be re-pointed (compromised maintainer / hijacked tag) and would then inject arbitrary code into the release workflows — which holdcontents: writeand the Docker Hub credentials (DOCKER_USERNAME/DOCKER_PASSWORD). SHA pins remove that class of supply-chain risk. The already-configured Dependabotgithub-actionsecosystem will bump the SHAs going forward, so they don't rot.Covers not just the 6 refs flagged on #107 but the pre-existing occurrences too (release-server.yml doubles, llama-pin-check.yml).
Clears code-scanning alerts 14, 18, 20, 33, 44–49, 64.
Test
actionlintclean on the toucheduses:lines (only pre-existing unrelatedsha256sum *shellcheck infos remain).🤖 Generated with Claude Code