Skip to content

ci: pin every third-party action to a full-length commit SHA - #1046

Draft
sirtimid wants to merge 2 commits into
mainfrom
sirtimid/pin-actions-to-sha
Draft

ci: pin every third-party action to a full-length commit SHA#1046
sirtimid wants to merge 2 commits into
mainfrom
sirtimid/pin-actions-to-sha

Conversation

@sirtimid

@sirtimid sirtimid commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Consensys-Incorporated requires every action reference to name a commit. The policy took effect after the last CI change landed, so nothing has run green here since #1042 on 2026-09-03, and merging main does not help — main is broken the same way:

The action actions/checkout@v7 is not allowed in Consensys-Incorporated/ocap-kernel
because all actions must be pinned to a full-length commit SHA.

That is a setup-job failure, so it takes down every job referencing a tag before a step runs.

All 37 third-party references now name a commit, with the release in a trailing comment. No version changes: every SHA is what the tag it replaces resolves to today. Local ./.github/... references are exempt and untouched.

This does not turn CI green on its own

The policy resolves actions transitively, and the MetaMask composite actions we call reach mutable tags one layer down. Pinning the call site does not reach them:

The actions actions/checkout@v6 and actions/setup-node@v6 are not allowed in
Consensys-Incorporated/ocap-kernel because all actions must be pinned to a
full-length commit SHA.

So Check changelog, Lint (no code changes), and everything under Lint, build, and test still fail on this branch, which means All jobs pass stays red and this cannot merge as it stands. It is worth landing as a unit anyway: it is the half that is uncontroversial, mechanically verifiable, and needed under either resolution.

Two ways to finish, neither in scope here:

  • Allow actions/* and MetaMask/* and drop the SHA requirement. The allow list alone does not help: GitHub applies the pinning policy to every action regardless of allow-list status — "this includes actions from your organization and actions authored by GitHub" — and the references that fail are already actions/*. Only reusable workflows are exempt from pinning.
  • Own those steps locally, as ci: get CI running again #1043 does.

Separately, better-sqlite3 12.x aborts on Node 24.20 during teardown, so the test jobs will need #1043's bump to 13.0.3 before they pass even once the action policy is settled.

Checked

  • No third-party uses: left unpinned, and none without a version comment
  • Every SHA verified against its tag through the API, and against what the mutable tag it replaced resolves to now
  • prettier --check clean across all workflow and action files

actionlint is not evidence for any of this: 1.6.25 discovers only .github/workflows.

sirtimid and others added 2 commits September 8, 2026 19:37
The org now refuses any action referenced by tag:

    The action actions/checkout@v7 is not allowed in
    Consensys-Incorporated/ocap-kernel because all actions must be pinned
    to a full-length commit SHA.

That is a setup-job failure, so it takes down every job that references
one before a step runs. Nothing has run green in this repository since
2026-09-03; the policy was turned on after the last commit that touched
CI, which is why merging main does not help.

Each tag is replaced by the commit it currently resolves to, with the
release it names in a trailing comment. Dependabot reads that comment,
so `github-actions` updates keep working and arrive as a SHA bump.

Local `./.github/...` references are exempt and left alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both were already pinned by SHA, so the policy was satisfied, but neither named
the release it points at, leaving a reader to resolve the hash by hand.

    anthropics/claude-code-action            c9ec2b02 -> v1.0.28
    davelosert/vitest-coverage-report-action 5b6122e3 -> v2.9.0

Dependabot's `github-actions` allow list covers only `actions/*` and
`MetaMask/*`, so neither gets an automated bump either way. The comment is for
people.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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