Repository navigation
Pin GitHub Actions to full-length commit SHAs - #1012
Open
Johannes Schindelin (dscho) wants to merge 2 commits into
Open
Johannes Schindelin (dscho) wants to merge 2 commits into
Johannes Schindelin (dscho) wants to merge 2 commits into
Conversation
Microsoft Git inherits GitHub workflows from upstreams that use non-pinned versions for convenience. For compliance reasons, Microsoft Git must pin those to SHA-1s. Here is a script that exchanges the moving tags/refs in the `uses:` statements with their fixed SHA-1s. Assisted-by: GPT-6.1 Sol Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Microsoft Git inherits workflows that upstream maintains using symbolic Action refs. Downstream organizational policy requires full commit IDs instead, adding pin maintenance to this project's maintainers' workload. Keep pins aligned with the original upstream Action refs in a fresh downstream snapshot, independent of any earlier pinning commit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Johannes Schindelin (dscho)
requested a review
from Matthew John Cheetham (mjcheetham)
October 19, 2026 13:16
Johannes Schindelin (dscho)
enabled auto-merge
October 19, 2026 13:16
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.
This PR pins GitHub Actions to full-length commit SHAs in the hopes to improve security and reproducibility. This work is described in more detail at https://aka.ms/action-pinning.
Pinning actions to commit SHAs prevents supply-chain attacks where a tag could be moved to point to malicious code. This is a recommended security best practice per the GitHub Actions security hardening guide.
This change mitigates the risk of tag retargeting to malicious code as seen in incidents like the tj-actions/changed-files action
compromise or codfish/semantic-release-action compromise and improves the integrity and reproducibility of the CI/CD pipeline.
Third-party action references in
.github/workflows/that used mutable tag-based references (e.g.,actions/checkout@v4) have been updated to full-length commit SHAs with a version comment (e.g.,actions/checkout@<sha> # v4) using the pinact tool. References that were already pinned to a SHA, or that used immutable release tags, were left unchanged.