Skip to content

ci(npm): publish CI-built npm packages with SLSA provenance (ADR-362) - #1516

Open
ruvnet wants to merge 2 commits into
mainfrom
feat/npm-provenance
Open

ruvnet wants to merge 2 commits into
mainfrom
feat/npm-provenance

Conversation

@ruvnet

@ruvnet ruvnet commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every CI job that runs npm publish now produces npm provenance (Sigstore/SLSA, signed through GitHub Actions OIDC).

  • Permissions. Each publish job declares, at job level, permissions: { contents: read, id-token: write } and env: NPM_CONFIG_PROVENANCE: 'true'. The repo's default token is already read-only, so contents: read takes no access away.
  • Why an env var, not --provenance. The env var reaches every publish path in a job: direct npm publish, scripts/ci/npm-publish-if-missing.sh, napi prepublish, and npm/packages/graph-node/scripts/publish-platforms.js. The generated platform-binary packages (@ruvector/<pkg>-<os>-<arch>) get provenance as well as the wrappers. --dry-run skips signing.
  • Jobs changed. The publish job in build-attention, build-diskann, build-gnn, build-graph-node, build-graph-transformer, build-kge, build-router, build-tiny-dancer, build-typesafe, publish-rvagent-wasm, ruvllm-build, ruvllm-native and sona-napi, plus publish-all's publish-npm job.
  • ruvector-publish. Only the env var was added, because its workflow-level permissions already include id-token: write for GCP federation.
  • protected-release. No change; it already passes --provenance.
  • Docs. Added docs/adr/ADR-362-npm-provenance.md and a matching INDEX.md row. ADR-361 is claimed by draft research(nightly): WASM32 portability of the ADR-347 witness-signing design (ADR-361) #1510, so this takes 362.

Not changed, deliberately

  • Versions. No versions change and nothing is published.
  • Runners. All publish jobs already run on GitHub-hosted runners (ubuntu-24.04 / ubuntu-latest), which is the requirement for provenance.
  • repository.url casing. The registry compares it case-insensitively. Both casings already carry attestations from this repo: @ruvector/core@0.1.38 uses ruvector.git and ruvector-core-*@0.1.35 use RuVector.git. Rewriting them would also break scripts/ci/check-platform-manifests.sh (ADR-356). Every CI-published package.json has a repository field pointing at this repo.

Do not normalize repository.url casing

Two spellings are in use, ruvector.git on the wrappers and RuVector.git on the platform manifests, and both are correct as they stand. npm matches the URL against the OIDC repository (https://github.com/ruvnet/RuVector) without regard to case, and both spellings already carry attestations. ADR-356's check-platform-manifests.sh requires RuVector.git on platform manifests. Fix a repository field only when it is missing or names another repo.

protected-release.yml coverage (already had provenance)

It covers exactly @ruvector/core and ruvector-core-{linux-x64-gnu,linux-arm64-gnu,darwin-x64,darwin-arm64,win32-x64-msvc}, published from sealed npm pack tarballs. It does not cover:

  • the ruvector umbrella;
  • any other @ruvector/* wrapper or its -<platform> packages;
  • the laptop-only packages.

core@0.1.38 is attested. core@0.1.39 is not, because it was published outside this workflow.

Validation

  • actionlint 1.7.12 on all 15 changed workflows reports no findings before or after the change.
  • node scripts/adr-index.mjs --check passes.
  • Provenance itself can't be tested without publishing. The first real publish from each workflow is the test. A rejected provenance shows up as an E422. In build-router and build-kge, which re-verify on the registry, that takes about 12 minutes to turn the job red.

Caveat

Versions published from a laptop have no provenance, and it cannot be added later. Most of the repo's npm packages have no CI publish path yet (see the ADR), so they stay unattested until one exists.

Verify with npm audit signatures, or curl https://registry.npmjs.org/-/npm/v1/attestations/<pkg>@<ver>.

🤖 Generated with RuFlo

…-362)

Each npm publish job now declares job-level `permissions: {contents: read,
id-token: write}` and `NPM_CONFIG_PROVENANCE: 'true'`, so every `npm publish`
it runs (direct, scripts/ci/npm-publish-if-missing.sh, napi prepublish,
publish-platforms.js) signs a Sigstore/SLSA provenance statement. Covers the
publish jobs of build-{attention,diskann,gnn,graph-node,graph-transformer,kge,
router,tiny-dancer,typesafe}, publish-rvagent-wasm, ruvllm-build,
ruvllm-native, sona-napi, publish-all (publish-npm) and ruvector-publish.
protected-release already passed --provenance.

No version, runner or repository.url changes: the registry already accepted
provenance for both ruvector.git and RuVector.git casings from this repo
(@ruvector/core@0.1.38, ruvector-core-*@0.1.35).

Co-Authored-By: RuFlo <ruv@ruv.net>
…cted-release coverage

Co-Authored-By: RuFlo <ruv@ruv.net>

This branch has not been deployed

No deployments
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