runner: verify npm provenance of the managed OpenCode download
tsk-jpffh4vavy3z Open
Why
The runner's managed OpenCode install (#2397, tsk-9hs09m3y4cm1) verifies the npm tarball by its sha512 dist.integrity (owner decision A, req-pzqcjh7x3jry, 2026-12-03 20:10Z). That proves the bytes match what the registry lists, but not that the package was built from the vendor's repository. The npm metadata for @opencode/cli-<target> also carries registry signatures and an SLSA provenance attestation naming github.com/anomalyco/opencode. Checking those closes the gap of a compromised publish token.
What
- Before installing, verify the npm provenance attestation of the exact
@opencode/cli-<target>@<version>: Sigstore bundle valid, subject digest equals the tarball's sha512, source repositoryanomalyco/opencode, built by the expected workflow. - Optionally also the registry signature (
dist.signatures) against npm's published public keys. - Fail closed: no attestation, wrong repository or mismatch refuses the install, with a message naming what failed.
- docs/runners.md OpenCode section says what is checked.
Boundary
After #2397 merges. Keeps decision A's sha512 check; this adds to it. Antigravity has no provenance and stays at its manifest sha512 (decision of the same evening).