Skip to content

🔒 Pin GitHub Actions to commit SHAs for supply chain security - #1099

Merged
0x46616c6b merged 1 commit into
mainfrom
pin-actions-to-sha
Feb 28, 2026
Merged

0x46616c6b merged 1 commit into
mainfrom
pin-actions-to-sha

Conversation

@0x46616c6b

Copy link
Copy Markdown
Member

Summary

  • Pin all third-party GitHub Actions to their full commit SHA with the version tag as a trailing comment (e.g. action@de0fac2e... # v6)
  • This prevents supply chain attacks through tag manipulation while keeping Dependabot compatibility for automated updates
  • Upgrades mhausenblas/mkdocs-deploy-gh-pages from @master (unstable branch reference) to the stable release 1.26

Details

All 28 uses: directives across 8 workflow files have been updated:

Action Tag Commit SHA
actions/checkout v6 de0fac2e4500dabe0009e67214ff5f5447ce83dd
actions/cache v5 cdf6c1fa76f9f475f3d7449005a359c84ca0f306
actions/setup-node v6 6044e13b5dc448c55e2357c09f80417699197238
actions/github-script v8 ed597411d8f924073f98dfc5c65a23a2325f34cd
shivammathur/setup-php v2 44454db4f0199b8b9685a5d763dc37cbf79108e1
peter-evans/find-comment v4 b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
peter-evans/create-or-update-comment v5 e8674b075228eee787fea43ef493e45ece1004c9
sonarsource/sonarqube-scan-action v7.0.0 a31c9398be7ace6bbfaf30c0bd5d415f843d45e9
docker/login-action v3.7.0 c94ce9fb468520275223c153574b00df6fe4bcc9
docker/setup-buildx-action v3 8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
docker/build-push-action v6 10e90e3645eae34f1e60eeb005ba3a3d33f178e8
github/codeql-action v4 89a39a4e59826350b863aa6b6252a07ad50cf83e
symfonycorp/security-checker-action v5 258311ef7ac571f1310780ef3d79fc5abef642b5
mhausenblas/mkdocs-deploy-gh-pages 1.26 d77dd03172e96abbcdb081d8c948224762033653

Why

Git tags are mutable — a compromised or malicious upstream maintainer could move a tag to point to different code. By pinning to the immutable commit SHA, the exact code that runs in CI is guaranteed. The # tag comment preserves human readability and enables Dependabot to propose version updates automatically.


The changes and the PR were generated by OpenCode.

Pin all third-party GitHub Actions to their full commit SHA with
the version tag as a trailing comment (e.g. `action@sha # v1`).
This prevents supply chain attacks through tag manipulation while
keeping Dependabot compatibility for automated updates.

Also upgrades mhausenblas/mkdocs-deploy-gh-pages from @master to
the stable release 1.26.

Co-Authored-By: OpenCode <noreply@opencode.ai>
@0x46616c6b
0x46616c6b marked this pull request as ready for review February 28, 2026 11:56
@sonarqubecloud

Copy link
Copy Markdown

@0x46616c6b
0x46616c6b merged commit a673255 into main Feb 28, 2026
12 checks passed
@0x46616c6b
0x46616c6b deleted the pin-actions-to-sha branch February 28, 2026 12:00
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.

1 participant