ci: pin all GitHub Actions to full commit SHAs to prevent supply-chain attacks#643
Open
XananasX7 wants to merge 1 commit into
Open
ci: pin all GitHub Actions to full commit SHAs to prevent supply-chain attacks#643XananasX7 wants to merge 1 commit into
XananasX7 wants to merge 1 commit into
Conversation
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
Several workflow files reference GitHub Actions pinned to mutable version tags (e.g.
@v4.2.2,@v4.1.7,@v1.13.0,@0.15.0). Tags are mutable — an attacker who gains write access to an upstream Action repository can silently move a tag to point to malicious code, which then executes in re2's CI pipelines and release workflows.The release workflow has
id-token: writeandattestations: writepermissions, making a compromised Action particularly dangerous (Sigstore signing can be abused, release artifacts tampered with).Affected files
.github/workflows/ci.yml.github/workflows/ci-cmake.yml.github/workflows/ci-bazel.yml.github/workflows/pages.yml.github/workflows/python.yml.github/workflows/release.yml.github/workflows/release-bazel.ymlVulnerability class
Supply-chain attack via mutable Action tag references (CWE-829). See GitHub Security hardening guide.
Fix
All actions are now pinned to their full immutable commit SHA with the version tag as an inline comment for human readability.