Skip to content

chore: pin GitHub Actions to commit SHAs#480

Merged
lwshang merged 6 commits intomainfrom
chore/pin-actions-to-sha
Apr 13, 2026
Merged

chore: pin GitHub Actions to commit SHAs#480
lwshang merged 6 commits intomainfrom
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

  • mozilla-actions/sccache-action@v0.0.9 -> mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9

  • dfinity/ci-tools/actions/setup-pnpm@main -> dfinity/ci-tools/actions/setup-pnpm@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/setup-dfx@main -> dfinity/setup-dfx@e50c04f104ee4285ec010f10609483cf41e4d365 # main

  • dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@main -> dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/.github/workflows/check-pr-title.yaml@main -> dfinity/ci-tools/.github/workflows/check-pr-title.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • actions/create-github-app-token@v1 -> actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0

  • dfinity/ci-tools/actions/setup-python@main -> dfinity/ci-tools/actions/setup-python@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/actions/setup-commitizen@main -> dfinity/ci-tools/actions/setup-commitizen@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/actions/bump-version@main -> dfinity/ci-tools/actions/bump-version@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/actions/create-pr@main -> dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • actions/cache@v3 -> actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0

  • actions/checkout@v6 -> actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

  • rust-lang/crates-io-auth-action@v1 -> rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1

  • dfinity/ci-tools/actions/generate-release-notes@main -> dfinity/ci-tools/actions/generate-release-notes@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

Files modified

  • .github/workflows/build-and-test.yml
  • .github/workflows/commitizen.yml
  • .github/workflows/create-release-pr.yml
  • .github/workflows/e2e-tests.yml
  • .github/workflows/publish.yml
  • .github/workflows/release.yml

@slawomirbabicz slawomirbabicz requested a review from a team as a code owner April 9, 2026 12:37
@lwshang lwshang merged commit 937eefd into main Apr 13, 2026
10 checks passed
@lwshang lwshang deleted the chore/pin-actions-to-sha branch April 13, 2026 15:56
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