Skip to content

chore: pin GitHub Actions to SHA for supply chain security#325

Open
kimyouknow wants to merge 3 commits intomainfrom
chore/pin-github-actions-sha
Open

chore: pin GitHub Actions to SHA for supply chain security#325
kimyouknow wants to merge 3 commits intomainfrom
chore/pin-github-actions-sha

Conversation

@kimyouknow
Copy link
Collaborator

@kimyouknow kimyouknow commented Feb 13, 2026

Summary

  • Pin all third-party GitHub Actions to full commit SHAs instead of floating version tags (@v5, @v6, etc.) to prevent supply chain attacks
  • Add dependabot.yml with grouped weekly updates to automatically keep SHAs current

Pinned Actions

Action SHA Version
actions/checkout 93cb6efe... v5.0.1
actions/setup-node 6044e13b... v6.2.0
changesets/action 6a0a831f... v1.7.0
peter-evans/create-pull-request 22a90890... v7.0.11
dorny/paths-filter de90cc6f... v3.0.2
codecov/codecov-action 671740ac... v5.5.2
preactjs/compressed-size-action 8518045e... v2.9.0

Dependabot

  • Group all action updates into a single PR using groups config
  • Automatically create update PRs on a weekly schedule

Next step

  • Enable "Require actions to be pinned to a full-length commit SHA" in Settings → Actions → General to enforce SHA pinning on all future workflow changes

Test plan

  • Verify integration workflow runs successfully
  • Verify compressed-size workflow runs successfully

Pin all third-party GitHub Actions to full commit SHAs instead of
floating version tags to prevent supply chain attacks. Add dependabot
configuration with grouped updates to automatically keep SHAs current.
The SHA-pinned v2.0.1 requires explicit repo-token input unlike the
floating v2 tag which had a default value.
v2.0.1 (2020) does not support Yarn 4, causing CI failure.
Pin to v2.9.0 which matches the previously used floating v2 tag.
@github-actions
Copy link
Contributor

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

@kimyouknow kimyouknow marked this pull request as ready for review February 13, 2026 00:56
@kimyouknow kimyouknow self-assigned this Feb 13, 2026
@zztnrudzz13
Copy link
Collaborator

what is this task for?

@kimyouknow
Copy link
Collaborator Author

This task pins all third-party GitHub Actions to full-length commit SHAs instead of mutable version tags (e.g., @.v5) to strengthen supply chain security.

Git tags are aliases that repo owners can reassign to a different commit at any time, which means malicious code could be injected and silently executed in CI. Commit SHAs are immutable, ensuring only the exact reviewed code runs.

Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants