Pin third-party actions to SHA and harden workflows - #37
Merged
Conversation
babarot
marked this pull request as ready for review
April 17, 2026 08:34
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
Pin all third-party GitHub Actions to full-length commit SHAs and update them to the latest stable versions. Add
persist-credentials: falseto checkout steps that don't require git credentials. Add.ghalint.yamlto exclude the tagpr job which needs credentials for pushing.Background
Unpinned actions using only version tags (e.g.
@v3,@v5) are vulnerable to supply chain attacks — a compromised tag can silently point to malicious code. SHA pinning ensures that the exact reviewed commit is used. Additionally,persist-credentials: falseprevents unintended use of the GITHUB_TOKEN after checkout, reducing the blast radius if a subsequent step is compromised.Changes
pinact -uwith 7-day cooldown):actions/checkout: v3/v4 →v6.0.2(SHA pinned)actions/labeler: v5 →v6.0.1(SHA pinned)Songmu/tagpr: v1.5.0 →v1.18.1(SHA pinned; v1.18.2/v1.18.3 skipped due to cooldown)EndBug/label-sync: v2 →v2.3.3(SHA pinned)persist-credentials: falseadded toadd_labels.yamlandsync_labels.yaml.ghalint.yamlcreated to excluderelease.yaml's tagpr job from the persist-credentials policy (tagpr needs credentials to push tags)