Skip to content

chore: pin GitHub Actions to commit SHAs#105

Merged
gregorydemay merged 5 commits into
mainfrom
chore/pin-actions-to-sha
May 8, 2026
Merged

chore: pin GitHub Actions to commit SHAs#105
gregorydemay merged 5 commits into
mainfrom
chore/pin-actions-to-sha

Conversation

@slawomirbabicz
Copy link
Copy Markdown
Contributor

Pin GitHub Actions to commit SHAs

GitHub Actions referenced by tag (e.g. actions/checkout@v4) use a mutable pointer — the tag owner can move it to a different commit at any time, including a malicious one. This is the attack vector used in the tj-actions/changed-files incident (CVE-2025-30066).

Pinning to a full 40-character commit SHA makes the reference immutable. The # tag comment preserves human readability so reviewers can tell which version is pinned.

Important: a SHA can also originate from a forked repository. A malicious actor can fork an action, push a compromised commit to the fork, and the SHA will resolve — but it won't exist in the upstream canonical repo. Each SHA in this PR was verified against the action's canonical repository (not a fork).

Changes

  • actions/checkout@v4 -> actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

  • dfinity/pocketic@main -> dfinity/pocketic@20c33db1aa87cc6ece50857ac632c37acf5e0322 # main

  • taiki-e/install-action@parse-changelog -> taiki-e/install-action@eb170ab528b4949b44322b05ed3a64beb7bc52f2 # parse-changelog

    • Version: parse-changelog | Latest: v2.75.4 | Release age: 7d
    • Commit: taiki-e/install-action@eb170ab
    • Warnings: Latest release v2.75.4 is only 0 day(s) old (< 7 days). Using previous safe release.
  • rust-lang/crates-io-auth-action@v1 -> rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1

  • softprops/action-gh-release@v2 -> softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1

Files modified

  • .github/workflows/ci.yml
  • .github/workflows/publish.yml
  • .github/workflows/release.yml

Security warnings

  • Latest release v2.75.4 is only 0 day(s) old (< 7 days). Using previous safe release.

@slawomirbabicz slawomirbabicz requested a review from a team as a code owner April 10, 2026 08:38
Comment thread .github/workflows/publish.yml Outdated
gregorydemay and others added 2 commits May 8, 2026 13:02
The previous form `taiki-e/install-action@eb170ab` (with the
`parse-changelog` shorthand) pinned to the SHA the moving
`parse-changelog` tag in install-action pointed at when Dependabot
ran. Since then the tag has moved (now `5fcbcfe`) and `eb170ab`
is no longer reachable from any branch or tag in install-action —
GitHub's UI shows it as 'This commit does not belong to any branch
on this repository'. A dangling object can be garbage-collected
and would break the workflow.

Pin to a SHA that's reachable from a release tag instead: the
canonical install-action form (`@v2.75.4` SHA) plus
`tool: parse-changelog@<v0.6.16 SHA>`. Both SHAs are tag-reachable
and durable, and Dependabot can track them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gregorydemay gregorydemay enabled auto-merge (squash) May 8, 2026 13:04
@gregorydemay gregorydemay merged commit 3fd4ad2 into main May 8, 2026
11 checks passed
@gregorydemay gregorydemay deleted the chore/pin-actions-to-sha branch May 8, 2026 13:06
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