Skip to content

chore: pin GitHub Actions to commit SHAs#57

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

chore: pin GitHub Actions to commit SHAs#57
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

  • 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@v1 -> actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0

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

  • 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/setup-pnpm@main -> dfinity/ci-tools/actions/setup-pnpm@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

  • actions/checkout@v5 -> actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

  • 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

  • dfinity/ci-tools/actions/npm-publish@main -> dfinity/ci-tools/actions/npm-publish@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main

Files modified

  • .github/workflows/commitizen.yml
  • .github/workflows/create-release-pr.yml
  • .github/workflows/generate-changelog.yml
  • .github/workflows/lint.yml
  • .github/workflows/release.yml
  • .github/workflows/test.yml

@slawomirbabicz slawomirbabicz requested a review from a team as a code owner April 9, 2026 13:55
Copilot AI review requested due to automatic review settings April 9, 2026 13:55
Copy link
Copy Markdown

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

Pins all third-party and reusable GitHub Actions workflow references to immutable commit SHAs to reduce supply-chain risk from mutable tags/branches.

Changes:

  • Replace @v* and @main action/workflow references with full 40-char commit SHAs (keeping a # tag/branch comment for readability).
  • Apply the pinning consistently across CI, lint, testing, release, and changelog workflows.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/commitizen.yml Pins reusable dfinity/ci-tools workflows to a commit SHA.
.github/workflows/create-release-pr.yml Pins actions/* and dfinity/ci-tools actions to commit SHAs.
.github/workflows/generate-changelog.yml Pins reusable generate-changelog workflow to a commit SHA.
.github/workflows/lint.yml Pins checkout + setup-pnpm actions to commit SHAs.
.github/workflows/release.yml Pins checkout + dfinity/ci-tools release-related actions to commit SHAs (other action already pinned).
.github/workflows/test.yml Pins checkout + setup-pnpm actions to commit SHAs.

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

@lwshang lwshang added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit c5fc2e5 Apr 13, 2026
14 checks passed
@lwshang lwshang deleted the chore/pin-actions-to-sha branch April 13, 2026 15:57
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