Update GitHub Actions to use pinned hash references #2505
Merged
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.
Description
This PR updates all GitHub Actions in the workflow files to use specific commit hashes rather than version tags. This follows GitHub's security best practice of using hash-pinned references to prevent potential supply chain attacks.
Security Rationale
The recent tj-actions/changed-files compromise (CVE-2025-30066) demonstrated how attackers can modify version tags to execute malicious code in workflows. Even with the current version tag in your workflows, your repository remains vulnerable to this type of attack.
By pinning to immutable SHA hashes, we ensure that the exact code run by your workflows is never silently changed, protecting against:
Changes
Impact
This change has no functional impact on your workflows but significantly improves security posture. The specific versions selected match or exceed the functionality of the previously used tag-based versions.
I've created a tool that automates this process: GitHub Workflow Checker which can be used to keep these references updated while maintaining the security benefits.