Skip to content

Pin third-party actions to SHA and harden workflows - #37

Merged
babarot merged 1 commit into
mainfrom
babarot/harden-workflows
Apr 17, 2026
Merged

Pin third-party actions to SHA and harden workflows#37
babarot merged 1 commit into
mainfrom
babarot/harden-workflows

Conversation

@babarot

@babarot babarot commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

Pin all third-party GitHub Actions to full-length commit SHAs and update them to the latest stable versions. Add persist-credentials: false to checkout steps that don't require git credentials. Add .ghalint.yaml to 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: false prevents unintended use of the GITHUB_TOKEN after checkout, reducing the blast radius if a subsequent step is compromised.

Changes

  • SHA pinning & version updates (via pinact -u with 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: false added to add_labels.yaml and sync_labels.yaml
  • .ghalint.yaml created to exclude release.yaml's tagpr job from the persist-credentials policy (tagpr needs credentials to push tags)

@github-actions github-actions Bot added the changelog/skip Used in case of no need to update changelog label Apr 17, 2026
@babarot
babarot marked this pull request as ready for review April 17, 2026 08:34
@babarot
babarot merged commit 9bdb951 into main Apr 17, 2026
1 check passed
@babarot
babarot deleted the babarot/harden-workflows branch April 17, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Used in case of no need to update changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant