Repository navigation
security(ci): pin third-party GitHub Actions to immutable commit SHAs - #501
Open
seuninfoo-svg wants to merge 1 commit into
Open
seuninfoo-svg wants to merge 1 commit into
seuninfoo-svg 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.
Close #481
PR: Pin Third-Party GitHub Actions to Immutable Commit SHAs
Summary
Pin every third-party action in
.github/workflows/*.ymlto a full 40-character commit SHA while preserving a human-readable version comment. This makes workflow dependencies immutable and protects against supply-chain attacks via compromised action releases.Problem
Workflows currently reference moving tags (e.g.,
actions/checkout@v4,actions/setup-node@v4). If a tag is moved to a malicious commit, all workflows using that tag would execute untrusted code.Solution
Replace all
uses:entries with pinned commit SHAs with trailing version comments:actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stableSwatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2Files Modified
.github/workflows/bindings-check.yml.github/workflows/contract.yml.github/workflows/coverage.yml.github/workflows/docs-links.ymlVerification
Acceptance Criteria ✅
uses:entry is pinned to a 40-character commit SHA