
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
trusted-publish-check
Advanced tools
Preflight your GitHub Actions workflow for npm OIDC trusted publishing before you hit the misleading 404/ENEEDAUTH at release time. Catches workflow filename mismatch, workflow_call indirection, missing id-token permission, stale npm/Node, and more.
Catches npm OIDC trusted-publishing misconfig before it breaks your release.
npm retired classic publish tokens (creation disabled 2025-11-05, all revoked ~2025-12-09), so
most CI publish workflows have moved to trusted publishing
— no token, just a GitHub Actions OIDC identity. The setup is a handful of small, exact-match
requirements, and npm doesn't validate any of them when you save the config. It only checks at
publish time, and when it's wrong you get a bare 404 or ENEEDAUTH with no indication of which
of the ~6 things is broken (npm/cli#9088).
trusted-publish-check reads your .github/workflows/*.yml and package.json and tells you
which one it is, before you push.
$ npx trusted-publish-check
trusted-publish-check scanned 1 workflow file(s) in .
[will-fail] Job 'publish' in publish.yml is missing 'id-token: write'
Without id-token: write, the runner cannot mint the OIDC token trusted publishing needs.
npm falls back to a token auth path with no token configured, surfacing as 404/ENEEDAUTH.
- no permissions block found at job or workflow level
fix: Add to job 'publish' (or the workflow top level):
permissions:
id-token: write
contents: read
1 likely publish failure(s), 0 thing(s) to double-check. Your next npm publish will likely 404/ENEEDAUTH.
No install needed — run it with npx:
npx trusted-publish-check
Or add it to your publish workflow so a bad config fails the PR, not the release:
- run: npx trusted-publish-check
All static, all read-only, no network calls:
workflow_call. npm
validates the filename of the calling workflow, not the one that actually runs npm publish.permissions: id-token: write on the job that publishes, without which the runner
never mints an OIDC token at all.NODE_AUTH_TOKEN set on the publish step — even to an empty string. npm tries the token
auth path first and never falls through to OIDC.setup-node silently leaves you on a CLI that doesn't speak OIDC.@scope/name publishes private by default — the
first publish 404s exactly like a broken trusted-publisher config, with no other symptom to
distinguish the two.npm publish — npm doesn't verify the filename
you configure on npmjs.com when you save it, so an ambiguous setup fails silently at the worst
time.trusted-publish-check [path] Scan a repo (default: current directory)
Options:
--json Machine-readable output
--warn-only Always exit 0 (report without blocking)
-h, --help Show this help
Exit code 1 on any finding likely to break your next publish, 0 otherwise (or always with
--warn-only, if you'd rather report than gate).
It's a preflight linter, not a publish gate or a security scanner — it doesn't touch your registry config, doesn't need any credentials, and doesn't attest or sign anything. It just reads your workflow files and tells you what npm's trusted-publisher validation is about to reject.
MIT
Built autonomously by an AI agent as part of an experiment in AI-run software ventures.
FAQs
Preflight your GitHub Actions workflow for npm OIDC trusted publishing before you hit the misleading 404/ENEEDAUTH at release time. Catches workflow filename mismatch, workflow_call indirection, missing id-token permission, stale npm/Node, and more.
The npm package trusted-publish-check receives a total of 1 weekly downloads. As such, trusted-publish-check popularity was classified as not popular.
We found that trusted-publish-check demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.