Skip to content

A manual Release run proves npm trust and never publishes - #21

Merged
renezander030 merged 1 commit into
masterfrom
agent/npm-trust-proof
Nov 22, 2026
Merged

renezander030 merged 1 commit into
masterfrom
agent/npm-trust-proof

Conversation

@renezander030

Copy link
Copy Markdown
Owner

A manual run of the Release workflow now proves, before any tag, that npm trusts this workflow for the package draftcat. It publishes nothing.

  • workflow_dispatch on release.yml runs only the new job npm-trust-proof (permissions: contents: read, id-token: write). It exchanges the job's OIDC token with npm per package (POST /-/npm/v1/oidc/token/exchange/package/<name>, the call npm publish makes first) and lists, per package, whether npm trusts the workflow, whether the version is still free, whether repository.url names this repository, and why npm refused. The result is the npm-trust-proof artifact and the step summary.
  • The exchanged token is dropped at once and never printed.
  • What changes for publishing: a manual run no longer re-publishes from a tag ref; every publishing job (verify, binaries, release, image, npm) runs only on a tag push. A manual run runs only the proof.
    This is a plain merge: no version change, no tag.

Evidence

The proof script's tests pass (trusted, 404 with its reason, foreign repository.url, missing id-token permission, network failure, scoped names, no secret in the output, runs from a path with a space or through a symlink). The workflow's jobs and their conditions were read back from the YAML. The workflow parses as YAML; the action pins resolve to v7.0.1 and v7.0.2 tags.

Door

Two-way: revert this commit; no run happens until someone presses Run workflow.

Blast radius

.github/workflows/release.yml and a new .github/scripts/npm-trust-proof.mjs. A manual run touches no package or tag on npm or GitHub.

workflow_dispatch ran every job on a v tag ref, so a manual run started on a
tag published again. Every publishing job now runs only on a tag push; a
manual run runs only npm-trust-proof, which exchanges the job's OIDC token with
npm and reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@renezander030
renezander030 merged commit 5ca7345 into master Nov 22, 2026
@renezander030
renezander030 deleted the agent/npm-trust-proof branch November 22, 2026 15:56
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