ci: pin GitHub Actions to full commit SHAs to prevent supply-chain attacks#780
Open
XananasX7 wants to merge 1 commit into
Open
ci: pin GitHub Actions to full commit SHAs to prevent supply-chain attacks#780XananasX7 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
Pins all GitHub Actions in the CI workflow to full commit SHAs instead of mutable version tags.
Vulnerability
Using mutable tags like
@v3,@v4,@v1means the action code can change without any notice — a compromised or malicious update to the action repository could silently alter what runs in CI. This is a common supply-chain attack vector (see tj-actions/changed-files incident).Changes
actions/checkout@v3@f43a0e5(v3)actions/setup-python@v4@7f4fc3e(v4)snok/install-poetry@v1@a783c32(v1)All pins point to the exact same version as before — behaviour is unchanged. The human-readable version comment is kept for readability.
References
Note
Low Risk
CI-only supply-chain hardening; no application, auth, or data-path changes.
Overview
Hardens CI by replacing mutable action tags (
@v3,@v4,@v1) with immutable full commit SHAs foractions/checkout,actions/setup-python, andsnok/install-poetryin the compile, test, and publish jobs in.github/workflows/ci.yml.Each pin keeps a version comment (e.g.
# v3) so upgrades stay readable. Runtime behavior is unchanged—the SHAs match the same releases that were referenced by the tags before.Reviewed by Cursor Bugbot for commit b407fb7. Bugbot is set up for automated code reviews on this repo. Configure here.