Skip to content

build: pin GitHub Actions to full commit SHAs - #381

Closed
oriolpetithelical wants to merge 1 commit into
releasefrom
pin-github-actions-to-sha
Closed

build: pin GitHub Actions to full commit SHAs#381
oriolpetithelical wants to merge 1 commit into
releasefrom
pin-github-actions-to-sha

Conversation

@oriolpetithelical

Copy link
Copy Markdown
Contributor

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/v1 are 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/checkout pinned at v5 (Node24; runners confirmed on Node24).
  • aws-actions/amazon-ecr-login at v2.1.6, docker/setup-buildx-action at v3 where present.
  • .github/dependabot.yml ignores 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

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
@oriolpetithelical oriolpetithelical self-assigned this Jul 9, 2026
@oriolpetithelical

Copy link
Copy Markdown
Contributor Author

Superseding this PR: re-targeting the same GitHub Actions SHA-pinning fix from base release to base main. A replacement PR against main will be opened from the same branch.

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