chore: pin GitHub Actions to commit SHAs - #261
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves GitHub Actions supply-chain security by replacing tag-based action references (mutable) with full 40-character commit SHAs (immutable), while keeping the original tag/branch noted in comments for readability.
Changes:
- Pinned
actions/checkout,actions/create-github-app-token, andoven-sh/setup-bunto commit SHAs. - Pinned all referenced
dfinity/ci-toolsreusable workflows and composite actions from@mainto a specific commit SHA.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/check-spec-drift.yml | Pins actions/checkout to an immutable commit SHA. |
| .github/workflows/commitizen.yml | Pins reusable dfinity/ci-tools workflows to an immutable commit SHA. |
| .github/workflows/create-release-pr.yml | Pins checkout, app-token, and dfinity/ci-tools actions to immutable commit SHAs. |
| .github/workflows/e2e-test-nodejs.yml | Pins checkout, pnpm setup, and bun setup actions to immutable commit SHAs. |
| .github/workflows/generate-changelog.yml | Pins reusable changelog workflow reference to an immutable commit SHA. |
| .github/workflows/lint.yml | Pins checkout and pnpm setup actions to immutable commit SHAs. |
| .github/workflows/release.yml | Pins several dfinity/ci-tools actions and the main checkout step to immutable commit SHAs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nikosxenakis
approved these changes
Apr 13, 2026
nikosxenakis
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
# tagcomment 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.1dfinity/ci-tools/.github/workflows/check-pr-title.yaml@main->dfinity/ci-tools/.github/workflows/check-pr-title.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/.github/workflows/check-commit-messages.yaml@main->dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # mainactions/create-github-app-token@v1->actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0dfinity/ci-tools/actions/setup-python@main->dfinity/ci-tools/actions/setup-python@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/setup-commitizen@main->dfinity/ci-tools/actions/setup-commitizen@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/setup-pnpm@main->dfinity/ci-tools/actions/setup-pnpm@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/bump-version@main->dfinity/ci-tools/actions/bump-version@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/create-pr@main->dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # mainoven-sh/setup-bun@v2->oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0dfinity/ci-tools/.github/workflows/generate-changelog.yaml@main->dfinity/ci-tools/.github/workflows/generate-changelog.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/is-beta-tag@main->dfinity/ci-tools/actions/is-beta-tag@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/generate-release-notes@main->dfinity/ci-tools/actions/generate-release-notes@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/extract-version@main->dfinity/ci-tools/actions/extract-version@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/assemble-docs@main->dfinity/ci-tools/actions/assemble-docs@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/submit-docs@main->dfinity/ci-tools/actions/submit-docs@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # mainFiles modified
.github/workflows/check-spec-drift.yml.github/workflows/commitizen.yml.github/workflows/create-release-pr.yml.github/workflows/e2e-test-nodejs.yml.github/workflows/generate-changelog.yml.github/workflows/lint.yml.github/workflows/release.yml