Skip to content

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

Merged
oriolpetithelical merged 2 commits into
mainfrom
pin-github-actions-to-sha
Jul 9, 2026
Merged

build: pin GitHub Actions to full commit SHAs#382
oriolpetithelical merged 2 commits into
mainfrom
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 @v2 / @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 publishes to PyPI, 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 bumped v2v5 (Node24; runners confirmed on Node24), actions/setup-python at v5, actions/upload-artifact at v4, pypa/gh-action-pypi-publish pinned at release/v1.
  • .github/dependabot.yml ignores major bumps so pins get patch/security PRs without surprise majors.
  • Supersedes build: pin GitHub Actions to full commit SHAs #381 (same fix, re-targeted from release to main).

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
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 merged commit af17d87 into main Jul 9, 2026
7 checks passed
@oriolpetithelical
oriolpetithelical deleted the pin-github-actions-to-sha branch July 9, 2026 15:06
oriolpetithelical added a commit that referenced this pull request Jul 9, 2026
* build: pin GitHub Actions to full commit SHAs

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
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.

3 participants