Repository navigation
ci: pin third-party actions to exact commit SHAs - #191
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preview deployment
Built from 2451a23 against the |
There was a problem hiding this comment.
🟡 Changes recommended
The code changes are correct and both pinned SHAs were verified against their tags, but it is deployment-pipeline configuration where I'd defer the final merge decision to a human reviewer rather than auto-approve.
No open issues 🎉
What changed in this PR
This PR hardens the CI/CD supply chain by pinning two third-party GitHub Actions to exact commit SHAs instead of mutable tag references, with the human-readable version retained in a trailing comment. This mitigates the risk of a publisher moving a tag to point at malicious code (as happened with tj-actions/changed-files in March 2025). It implements option 2 from bosonprotocol/core-components#1046 and is purely a hardening change with no runtime behavior change.
Changes:
- Pin
marocchino/sticky-pull-request-comment@v2→@773744901bac0e8cbb5a0dc842800d45e9b2b405(v2.9.4). - Pin
cloudflare/wrangler-action@v3→@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd(v3.15.0).
| File | Description |
|---|---|
.github/workflows/deploy-preview.yaml |
Pins the sticky PR comment action to the verified SHA for v2.9.4. |
.github/workflows/deploy_reusable.yaml |
Pins the Cloudflare wrangler deploy action to the verified SHA for v3.15.0. |
Review effort: Balanced
What this does
Pins 2 third-party action references in 2 files to the exact commit each tag points to today, with the version in a comment. This is option 2 from bosonprotocol/core-components#1046.
@v4can be moved by its publisher; a commit SHA cannot. That is what happened withtj-actions/changed-filesin March 2025.Pinned
.github/workflows/deploy-preview.yamlmarocchino/sticky-pull-request-comment@v2marocchino/sticky-pull-request-comment@7737449.github/workflows/deploy_reusable.yamlcloudflare/wrangler-action@v3cloudflare/wrangler-action@9acf94aFull SHAs are in the diff.
marocchino/sticky-pull-request-comment: v2 is a branch; its head is the commit of release tag v2.9.4.Left as they are
Nothing: every third-party reference in this repo is now pinned.
cloudflare/wrangler-actioninstalls a tool at run time (your "check carefully" list in Cheap alternative to #1045: pin third-party actions by SHA and allow those exact SHAs at org level core-components#1046). Pinning freezes the action, not what it installs.How to check
On this pull request, these workflows start (no "workflow file issue") and pass:
In each job's "Set up job" log, the "Download action repository" lines show the pinned SHAs.
After the merge to
main:main: wrangler.Once this is green, the organisation's "any version" entries for these actions can be swapped for the exact SHAs, but only for an action that no other repo still uses by tag.
Rollback: revert this merge.
Prepared by Claude for Justin; Ludo reviews and merges. Refs bosonprotocol/core-components#1046.
🤖 Generated with Claude Code