ci: pin GitHub Actions to commit SHAs - #755
Open
davidberenstein1957 wants to merge 1 commit into
Open
davidberenstein1957 wants to merge 1 commit into
davidberenstein1957 wants to merge 1 commit into
Conversation
Replace mutable tag references with the commit SHA each tag points to today, keeping the tag as a trailing comment. Resolves the Semgrep github-actions-mutable-action-tag findings reported by Bastion.
This branch has not been deployed
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.
Description
Pins every third-party GitHub Action in this repository to a full commit SHA and keeps the release tag as a trailing comment, for example
uses: actions/checkout@<sha> # v4.2.2. This resolves the Semgrepgithub-actions-mutable-action-tagfindings that Bastion reports for this repository.Whoever controls an action can move a tag such as
@v4to different code, which is how the tj-actions/changed-files compromise (CVE-2025-30066) reached other repositories' workflows. A commit SHA cannot be moved.Each SHA is the commit its existing tag points to today, so action versions do not change unless noted below.
tj-actions/changed-files@v47is pinned to the commit behind v47.0.0. v47 was released after the fix for CVE-2025-30066, the March 2025 compromise of that action.Related Issue
N/A
Type of Change
Testing
Generated with pinact 5.0.0 (
pinact runover.github/workflowsand.github/actions). A grep confirms that nouses:line for a remote action is left without a 40-character SHA. The workflows this PR touches run in CI here.uv run pytest -m "cpu and not slow") (N/A, no code changes)Checklist
Commits: