Skip to content

Pin GitHub Actions to commit SHAs - #621

Merged
mbenke merged 1 commit into
mainfrom
pin-actions-sha
Oct 22, 2026
Merged

mbenke merged 1 commit into
mainfrom
pin-actions-sha

Conversation

@marcocastignoli

Copy link
Copy Markdown
Member

Why

Tags such as actions/checkout@v4 are mutable. The owner of an action can move a tag to different code. That code then runs in our workflows with our secrets. A full-length commit SHA cannot change.

Changes

  • Pinned 13 uses: refs across 5 actions (6 action and major-version pairs) in haskell.yml, reference-docs.yml and spec.yml. Each pin has a version comment, for example # v4.4.0.
  • The pins keep the major versions that the workflows use today: actions/checkout v4 and v6, cachix/install-nix-action v31, actions/upload-pages-artifact v4, actions/deploy-pages v5, actions/upload-artifact v4.
  • No branch refs and no ref-as-input actions were present. No with: inputs changed.
  • actions/upload-pages-artifact v4.0.0 is a composite action. Its nested actions/upload-artifact ref is already pinned to a SHA. cachix/install-nix-action is also composite and has no nested actions.
  • Added .github/dependabot.yml for the github-actions ecosystem. It checks weekly and waits 14 days before it proposes a new release.

Follow-up

After merge, a repo admin can enable "Require actions to be pinned to a full-length commit SHA" in Settings → Actions → General.

Part of argotorg/todo#67

🤖 Generated with Claude Code

Pin every external action to a full-length commit SHA with a version
comment. Add a Dependabot config for the github-actions ecosystem with
a 14-day cooldown to keep the pins fresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mbenke mbenke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mbenke
mbenke merged commit 5992f40 into main Oct 22, 2026
4 checks passed
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.

2 participants