Skip to content

chore: pin GitHub Actions to commit SHAs#137

Merged
nikosxenakis merged 8 commits intomainfrom
chore/pin-actions-to-sha
Apr 13, 2026
Merged

chore: pin GitHub Actions to commit SHAs#137
nikosxenakis merged 8 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@v6 -> actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

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

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

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

  • actions/create-github-app-token@v3 -> actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3

  • 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

  • dfinity/ci-tools/.github/workflows/generate-changelog.yaml@main -> dfinity/ci-tools/.github/workflows/generate-changelog.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

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

  • dfinity/ci-tools/actions/assemble-docs@main -> dfinity/ci-tools/actions/assemble-docs@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/actions/submit-docs@main -> dfinity/ci-tools/actions/submit-docs@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

  • dfinity/ci-tools/actions/is-beta-tag@main -> dfinity/ci-tools/actions/is-beta-tag@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

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

Files modified

  • .github/workflows/audit.yml
  • .github/workflows/codestyle.yml
  • .github/workflows/commitizen.yml
  • .github/workflows/create-release-pr.yml
  • .github/workflows/generate-changelog.yml
  • .github/workflows/publish-docs.yml
  • .github/workflows/release.yml
  • .github/workflows/test.yml

@slawomirbabicz slawomirbabicz requested a review from a team as a code owner April 10, 2026 08:48
Copilot AI review requested due to automatic review settings April 10, 2026 08:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the repository’s GitHub Actions supply chain by replacing mutable action references (tags/branches like @v* / @main) with immutable 40-character commit SHAs (while keeping a trailing # <tag/branch> comment for readability).

Changes:

  • Pinned actions/checkout and actions/create-github-app-token to full commit SHAs across workflows.
  • Pinned all dfinity/ci-tools composite actions and reusable workflows to a specific commit SHA.
  • Kept existing already-pinned actions (e.g., mozilla-actions/sccache-action, ncipollo/release-action) unchanged.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/audit.yml Pin checkout + setup-pnpm action references to SHAs.
.github/workflows/codestyle.yml Pin checkout + setup-pnpm action references to SHAs.
.github/workflows/commitizen.yml Pin reusable dfinity/ci-tools workflows to a SHA.
.github/workflows/create-release-pr.yml Pin checkout, token creation, and ci-tools actions to SHAs.
.github/workflows/generate-changelog.yml Pin reusable generate-changelog workflow reference to a SHA.
.github/workflows/publish-docs.yml Pin token creation, checkout, and ci-tools actions to SHAs.
.github/workflows/release.yml Pin checkout and ci-tools actions to SHAs (release pipeline).
.github/workflows/test.yml Pin checkout + setup-pnpm action references to SHAs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikosxenakis nikosxenakis merged commit e2a7e7d into main Apr 13, 2026
14 of 15 checks passed
@nikosxenakis nikosxenakis deleted the chore/pin-actions-to-sha branch April 13, 2026 07: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.

3 participants