chore: pin GitHub Actions to commit SHAs#137
Merged
nikosxenakis merged 8 commits intomainfrom Apr 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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/checkoutandactions/create-github-app-tokento full commit SHAs across workflows. - Pinned all
dfinity/ci-toolscomposite 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
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@v6->actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2dfinity/ci-tools/actions/setup-pnpm@main->dfinity/ci-tools/actions/setup-pnpm@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/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@v3->actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3dfinity/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/bump-version@main->dfinity/ci-tools/actions/bump-version@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/actions/create-pr@main->dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # maindfinity/ci-tools/.github/workflows/generate-changelog.yaml@main->dfinity/ci-tools/.github/workflows/generate-changelog.yaml@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 # 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 # mainFiles 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