Repository navigation
ci: pin GitHub Actions to full commit SHAs - #1901
Conversation
Replace every third-party `uses: owner/repo@vN` reference in .github/workflows with the 40-character commit SHA that the tag currently resolves to, keeping the exact release as a trailing comment. Each pin was checked with `git ls-remote --tags`: the floating major tag and the commented release dereference to the same commit. Local reusable workflows are unchanged. Re-pin reactivecircus/android-emulator-runner from the SHA of the annotated `v2` tag object (4c44018e) to the commit it points to (a421e438, v2.38.0); Actions resolves both, but only the commit SHA is an immutable reference that tooling can compare with the release. Update the Windows Ghidra workflow trust-boundary test to require SHA-pinned setup-node and upload-artifact references instead of the previous floating tags. Validation: actionlint v1.7.7 (-shellcheck= -pyflakes=, as in CI), YAML parse of all workflows, no remaining unpinned third-party `uses:`, and the workflow boundary/conformance tests.
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. |
Resolved the ci.yml conflict by taking upstream's new workflow and re-pinning every action reference to the same full commit SHAs used on this branch. Also pinned the action references upstream added since the branch point: actions/cache and actions/cache/restore v4.3.0 in the portable-build-cache composite action, and actions/checkout, actions/setup-node and actions/setup-go v5.6.0 in real-go-binary.yml. Nothing was superseded; upstream still uses floating tags.
|
Merged current main and resolved the ci.yml conflict by re-applying the same SHA pins to upstream's new workflow. I also pinned the actions main added since this PR opened: actions/cache and cache/restore in the new portable-build-cache composite action, and setup-go, checkout and setup-node in real-go-binary.yml. No unpinned remote |
|
@greptileai review |
|
Retained current main workflows and cache guards while pinning every external action to a full SHA, including new main workflows. Source inspection and git diff --check. Further tests/typechecks/builds skipped by explicit user instruction; canceled validations are not passes.
Retain formatting edits produced before the user stopped validation. Source inspection and git diff --check only. Tests, builds and typechecks skipped by explicit user request. GitHub review writes paused globally.
morluto#1901 pinned every external action to a commit SHA, but real-cutter.yml later reintroduced actions/upload-artifact@v4 and actions/download-artifact@v4. A moved tag would change the code that runs in CI. Pin those references to the SHAs used elsewhere in the repository and add a boundary test that fails on any external action not pinned to a full commit SHA, so the regression cannot recur unnoticed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Every third-party
uses: owner/repo@vNin.github/workflowsis replaced with the 40-character commit SHA that the tag currently resolves to. The exact release is kept as a trailing comment (for exampleactions/checkout@11d5960a… # v4.4.0). Floating tags can be moved by whoever controls the action repository, andrelease.ymlholds npm and MCP Registry publication credentials.Change and scope
The pins, each checked with
git ls-remote --tags; in every casevN^{}andvX.Y.Z^{}are the same commit:11d5960a326750d5838078e36cf38b85af677262d23441a48e516b6c34aea4fa41551a30e30af80349933ea5288caeca8642d1e84afbd3f7d6820020249970729cb0ef3589644e2896645e5dc5ba9c38ea165f8d65b6e75b540449e92b4886f43607fa02d3f86a106a0bac45b974a628896c90dbdf5c809367a3573c9a986a3f9c594539f4ab511d57bb3ce9a26af69be951a213d495a4c3e4e4022e16d87065983d7736d9b0ae728b81ab479565c72886d7745b7b1f4a764d45c48632c6b24a0339c27f5614fb0bd6db90164ac5ed86f2b6aed7e0febac5b3c0c03e5c625bfb5d1ff62eadeeb3772007f7f66fdcf071953926a2e2182532811c01a25e53647d93bf07c04c44018e…, the annotatedv2tag object)a421e43855164a8197daf9d8d40fe71c6996bb0dandroid-emulator-runnerwas already pinned, but to the SHA of the annotated tag object (refs/tags/v2), not to the commit (refs/tags/v2^{}). Actions resolves both. Only the commit SHA can be compared against the release, and some tooling (Dependabot, pin checkers) does not treat tag-object SHAs as pins.tests/conformance/providers/ghidra/realGhidraWindowsWorkflow.test.tsnow requires SHA-pinnedsetup-nodeandupload-artifactin the Windows Ghidra workflow.main, including the shard and cache changes in 40b37ae and the website workflow from a2d3338. Local reusable workflows (./.github/workflows/*.yml) are unchanged. No job conditions, permissions or steps change.Contract and boundary impact
Evidence and regression coverage
realGhidraWindowsWorkflow.test.ts.uses:line outside local workflows lacks a@<40-hex> # vX.Y.Zpin.Validation performed
actionlintv1.7.7 with-shellcheck= -pyflakes=(the same flags as CI): no findings.yamlpackage): OK.npx vitest run tests/boundary/filesystem/ciChangeScope.test.ts tests/boundary/filesystem/releaseCheckpoint.test.ts tests/boundary/filesystem/releaseWorkflow.test.ts tests/conformance/providers/ghidra/realGhidraWindowsWorkflow.test.ts: 130 passed.npx vitest run tests/process-global/curatedWindowsLane.test.ts: 2 passed.npx oxlint: 0 errors.npm run format: no changes.Compatibility, safety, and release
github-actionsecosystem understands@sha # vX.Y.Zcomments, if maintainers want it.Limits / not verified