ci: pin all GitHub Actions to full commit SHAs to prevent supply-chain attacks#9160
Open
XananasX7 wants to merge 1 commit into
Open
ci: pin all GitHub Actions to full commit SHAs to prevent supply-chain attacks#9160XananasX7 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
The
release.ymlworkflow uses multiple GitHub Actions pinned to mutable version tags (e.g.@v6,@v5,@v1,@v2). An attacker who compromises any of these upstream Action repositories can silently change what@v5or@v6points to, and that malicious code will execute the next time a release is published — with access to repository secrets (NPM_TOKEN,TWINE_TOKEN,NUGET_API_KEY,CARGO_TOKEN,MAVEN_GPG_PRIVATE_KEY, etc.).Affected file
.github/workflows/release.ymlVulnerability class
Supply-chain attack via mutable Action tag references (CWE-829).
Affected actions (before → after)
actions/checkout@v6@df4cb1c069e1874edd31b4311f1884172cec0e10actions/setup-node@v6@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041eactions/setup-python@v6@ece7cb06caefa5fff74198d8649806c4678c61a1actions/setup-dotnet@v5@26b0ec14cb23fa6904739307f278c14f94c95bf1actions/setup-java@v5(×2)@1bcf9fb12cf4aa7d266a90ae39939e61372fe520actions-rs/toolchain@v1@16499b5e05bf2e26879000db0c1d13f7e13fa3afkatyo/publish-crates@v2(×2)@02cc2f1ad653fb25c7d1ff9eb590a8a50d06186bFix
All actions are now pinned to their full immutable commit SHA, with the version tag kept as an inline comment for human readability.