Repository navigation
ci: pin all GitHub Actions to full commit SHAs - #65
Conversation
Pin every `uses:` reference in .github/workflows to the commit SHA of the latest release within the major version already in use, with the tag in a trailing comment. Resolves Codacy's two "Enforce Pinning of Third-Party GitHub Actions to Full Commit SHA" issues in draft-release.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016QZq4r8oBXkUEKp5sPvoXV
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
🟢 Approval recommended
Every pinned SHA was verified against its upstream tag and all 22 action references are now correctly pinned, leaving no outstanding findings.
No open issues 🎉
What changed in this PR
This PR hardens CI supply-chain security by pinning every uses: reference in .github/workflows/ to a full 40-character commit SHA, with the release tag preserved in a trailing comment (matching the style already used for other actions in tests.yml). It resolves Codacy's two open "Enforce Pinning of Third-Party GitHub Actions to Full Commit SHA" findings on draft-release.yml (shivammathur/setup-php, softprops/action-gh-release) and extends the same treatment to first-party actions/* for consistency. Each action is pinned to the latest release within its existing major version, so there are no version bumps or behavioral changes.
Changes:
- Pinned
actions/checkout,actions/upload-artifact, andactions/setup-nodemutable@v7tags to commit SHAs across all four workflows. - Pinned
shivammathur/setup-php@v2andsoftprops/action-gh-release@v3to commit SHAs indraft-release.yml. - Each SHA carries a trailing
# <tag>comment; verified that all SHAs match their upstream tags (annotated tags correctly pinned to peeled commit SHAs).
| File | Description |
|---|---|
.github/workflows/tests.yml |
Pins checkout (×6), upload-artifact, and setup-node to commit SHAs. |
.github/workflows/draft-release.yml |
Pins checkout, setup-php, and action-gh-release — resolves the two Codacy findings. |
.github/workflows/deploy-wporg.yml |
Pins actions/checkout to a commit SHA. |
.github/workflows/update-wporg-assets.yml |
Pins actions/checkout to a commit SHA. |
Review effort: Balanced
Pull Request
Description
Pins every
uses:reference in.github/workflows/to a full 40-character commit SHA, with the release tag in a trailing comment (same style as the existing pins intests.yml). Each action is pinned to the latest release within the major version already in use, so there are no major-version bumps and no other workflow changes.This resolves Codacy's 2 open "Enforce Pinning of Third-Party GitHub Actions to Full Commit SHA" issues (
draft-release.yml:24shivammathur/setup-php@v2,draft-release.yml:37softprops/action-gh-release@v3). First-partyactions/*are pinned too, for consistency.actions/checkout@v73d3c42e5aac5ba805825da76410c181273ba90b1actions/upload-artifact@v7cf430e030ddbb5b0abf93d22962f4752f3646cd9actions/setup-node@v7949feb2413d6458794dcd2491c4babbbce0c15c1shivammathur/setup-php@v2eb7c497e18156a6bbabfef1d3a82760b9eda3962(peeled; same pintests.ymlalready uses, no newer 2.x)softprops/action-gh-release@v3efb35369e0ad2afab669f228072c1b0d510eae64(peeled).github/dependabot.ymlalready has a weeklygithub-actionsentry, so Dependabot will keep these pins (and their comments) updated. No change needed there.Related Issue
None. Addresses Codacy findings on
main.Type of Change
Checklist
Testing Instructions
grep -nE 'uses:' .github/workflows/*.yml | grep -vE '@[0-9a-f]{40}'returns nothing.git ls-remote https://github.com/<owner>/<repo> refs/tags/<tag>(peeled entry for annotated tags).yaml.safe_load(actionlint wasn't available).tests.ymlwith the new pins.draft-release.ymland the WordPress.org workflows only run on tags/releases/dispatch.Generated by Claude Code