Skip to content

Security: pin GitHub Actions to prevent supply chain attacks#35

Open
allie-fowler wants to merge 1 commit intomasterfrom
fix/pin-github-actions
Open

Security: pin GitHub Actions to prevent supply chain attacks#35
allie-fowler wants to merge 1 commit intomasterfrom
fix/pin-github-actions

Conversation

@allie-fowler
Copy link
Copy Markdown

Summary

Updates all action references in the README workflow from mutable branch
references (@master) to pinned versions, mitigating supply chain attacks.

Why this matters

In March 2025, the tj-actions/changed-files supply chain attack demonstrated that referencing actions by mutable branch or tag names is dangerous. Attackers who compromise an action repo can rewrite a tag or push to a branch, and every downstream workflow silently runs the attacker's code with full access to the repo's secrets.

This repo is public, meaning its workflow files are visible to anyone researching targets.

Changes

Action Before After Why
actions/checkout @master @v6 GitHub-owned — major version tag is safe
rlespinasse/github-slug-action @v2.x @9e7def6... (v5) Third-party — SHA-pinned against tag rewriting
ad-m/github-push-action @master @77c5b41... (v1.0.0) Third-party — SHA-pinned against tag rewriting

GitHub-owned actions (actions/*) use major version tags since GitHub controls those repos. Third-party actions are SHA-pinned because any individual maintainer's account could be compromised.

Test plan

  • Verify workflow YAML is valid
  • Confirm the create trigger still fires and updates the README on new branches

Updates all action references in the README workflow to use pinned
versions instead of branch references (@master).

Background:
In March 2025, the tj-actions/changed-files supply chain attack
demonstrated that referencing actions by mutable branch or tag names
is dangerous. Attackers who compromise an action repo can rewrite
a tag or push to a branch, and every downstream workflow silently
runs the attacker's code with access to the repo's secrets.

See: https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation

Changes:
- actions/checkout: @master -> @v6 (GitHub-owned, major version tag)
- rlespinasse/github-slug-action: @v2.x -> @<sha> (v5, SHA-pinned)
- ad-m/github-push-action: @master -> @<sha> (v1.0.0, SHA-pinned)

GitHub-owned actions (actions/*) use major version tags since GitHub
controls those repos and follows semver. Third-party actions are
SHA-pinned because any individual maintainer account could be
compromised, and a SHA is immutable.
@allie-fowler allie-fowler requested a review from jacquayj March 18, 2026 13:56
@allie-fowler allie-fowler self-assigned this Mar 18, 2026
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