Pin third-party actions to commit SHAs#418
Merged
Merged
Conversation
Pin all non-GitHub-owned actions to full-length commit SHAs per https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions to prevent a moved tag from silently introducing malicious code. The version is kept as a trailing comment, and Dependabot continues to bump both the SHA and comment. GitHub-owned actions/* and github/* are left on tags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lboynton
approved these changes
Jun 18, 2026
Contributor
There was a problem hiding this comment.
⚠️ Not ready to approve
The PHP workflow still uses the deprecated ::set-output command in the same touched hunk and should be updated to $GITHUB_OUTPUT to avoid future runner incompatibilities.
Pull request overview
This PR hardens the repository’s CI/CD security posture by pinning third-party GitHub Actions to immutable commit SHAs (while preserving the human-readable tag/version in trailing comments) across the language workflows.
Changes:
- Replace third-party
uses: owner/action@tagreferences withuses: owner/action@<full SHA> # <tag>in workflows. - Pin the Rust release automation action (
release-plz) and Rust toolchain action code to SHAs. - Pin third-party actions used for release/tagging and wrapper validation in Java/Java7 workflows.
File summaries
| File | Description |
|---|---|
| .github/workflows/rust.yml | Pins Rust toolchain and release-plz third-party actions to SHAs. |
| .github/workflows/ruby.yml | Pins ruby/setup-ruby and regex-match third-party actions to SHAs. |
| .github/workflows/php.yml | Pins PHP setup and git-subtree third-party actions to SHAs. |
| .github/workflows/node.yml | Pins regex-match third-party action to a SHA. |
| .github/workflows/java.yml | Pins wrapper validation, tag creation, and GH release third-party actions to SHAs. |
| .github/workflows/java7.yml | Pins wrapper validation, tag creation, and GH release third-party actions to SHAs. |
| .github/workflows/codeql.yml | Pins dorny/paths-filter third-party action to a SHA. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 1
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Pins all third-party GitHub Actions to full-length commit SHAs, following GitHub's secure-use guidance. A version tag (e.g.
@v3) is mutable — whoever controls the action can move it to point at new code. Pinning to an immutable commit SHA prevents a compromised or repointed tag from silently running in our workflows.The human-readable version is preserved as a trailing comment (
# v3), and Dependabot continues to bump both the SHA and the comment.Actions pinned
dorny/paths-filtershivammathur/setup-phpstefandanaita/git-subtree-actionactions-ecosystem/action-regex-matchruby/setup-rubydtolnay/rust-toolchainMarcoIeni/release-plz-actiongradle/wrapper-validation-actionmathieudutour/github-tag-actionsoftprops/action-gh-releaseNotes
actions/*(checkout, cache, setup-*) andgithub/codeql-action/*are first-party and out of scope for the third-party guidance.dtolnay/rust-toolchain@stablepins the action code only; it still installs the latest stable Rust toolchain at runtime, so build behavior is unchanged.uses:lines changed — no logic or permissions changes.🤖 Generated with Claude Code