build: pin GitHub Actions to full commit SHAs - #381
Closed
oriolpetithelical wants to merge 1 commit into
Closed
Conversation
Pin every `uses:` reference in the workflows to a full 40-char commit SHA and add .github/dependabot.yml. Mutable action tags (e.g. @v4, @release/v1) can be silently repointed by the action owner, enabling supply-chain attacks (OWASP A08, CWE-1357 / CWE-353) -- as seen in the tj-actions / trivy-action compromises. Pinning to an immutable SHA removes that risk; the trailing `# <version>` comment keeps it readable and lets Dependabot open reviewable update PRs. Runners are confirmed on Node24, so actions were bumped to their latest majors (checkout v5, ecr-login v2.1.6, etc.). Refs helicalAI/dashboard#1154 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECugizP29xGmLLDBDLNzCm
Contributor
Author
|
Superseding this PR: re-targeting the same GitHub Actions SHA-pinning fix from base |
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
Pins every GitHub Actions
uses:reference in this repo's workflows to a full 40-character commit SHA (with a# <version>comment), and adds.github/dependabot.yml.Why
Mutable tags like
@v4/@release/v1are labels the action owner can silently repoint to malicious code — a supply-chain attack vector (OWASP A08:2021/2025, CWE-1357, CWE-353), exploited in the real-world tj-actions and trivy-action compromises. Since CI here handles secrets and/or ships artifacts, this is rated HIGH. Pinning to an immutable SHA closes the hole; Dependabot (added here) still surfaces real updates as reviewable PRs — nothing auto-merges.Notes
actions/checkoutpinned at v5 (Node24; runners confirmed on Node24).aws-actions/amazon-ecr-loginat v2.1.6,docker/setup-buildx-actionat v3 where present..github/dependabot.ymlignores major bumps so pins get patch/security PRs without surprise majors.Refs helicalAI/dashboard#1154
🤖 Generated with Claude Code
https://claude.ai/code/session_01ECugizP29xGmLLDBDLNzCm