MKI
npm's trusted publishing finally fits how teams actually ship
npm now allows multiple OIDC trusted publisher configs per package, so staging, prerelease, and stable pipelines no longer need a shared long-lived token.
For the past year, npm’s trusted publishing has been the obvious right answer for anyone tired of managing long-lived publish tokens: your CI workflow proves who it is with a short-lived OIDC token instead of a secret sitting in a repo setting. The catch was that a package could only have one of these configurations at a time. If your release process used more than one workflow — a stable release job, a nightly prerelease job, a separate staging pipeline — you were stuck bolting one of them onto OIDC and leaving the rest on old-fashioned tokens, or contorting everything into a single workflow file just to keep one trusted publisher happy.
On September 3, 2026, GitHub shipped the fix. Packages can now hold up to ten trusted publisher configurations at once, each tied to its own repository, workflow, and (optionally) environment. Any one of them being satisfied is enough to authorize a publish. It’s a small permissions change with an outsized effect on how teams can structure releases without carrying a token they have to rotate and worry about.
What changed
Three related updates to npm publishing went generally available together, all covered in GitHub’s changelog:
Multiple trusted publisher configurations per package. You add, list, and remove them independently from the package’s settings page on npmjs.com. Each is scoped to its own repository, workflow file, and optional deployment environment, and a publish is authorized the moment the incoming OIDC token matches any single configuration. npm’s docs are explicit that configurations don’t restrict each other and evaluation order isn’t guaranteed, so don’t write automation that assumes one configuration takes precedence over another.
Staged packages can only be approved after malware scanning finishes. npm has been auto-scanning newly published packages since late July, typically within about five minutes, sometimes up to fifteen or more at peak. Now, in the staged-publishing approval queue, the Approve button stays disabled until that scan clears, and the page refreshes status every minute.
Maintainers can see staged history per version. The Versions tab on npmjs.com now shows whether each version was approved, rejected, or is still sitting in the staging queue — useful once you have several publishers feeding the same package and want to know which one produced which release.
Trusted publishing itself now supports three CI/CD providers: GitHub Actions, GitLab CI/CD, and CircleCI, all cloud-hosted only for now (self-hosted runners aren’t supported yet). It requires npm CLI 11.5.1+ and Node 22.14.0+.
Why one configuration per package was a real limit
The old one-configuration ceiling wasn’t just an inconvenience for exotic setups. Plenty of ordinary projects publish from more than one place: a release.yml that fires on a version tag for stable builds, a separate canary.yml that publishes a prerelease tag on every merge to main, maybe a third workflow that only stages packages for manual review before a security-sensitive release. Under the single-configuration rule, only one of those could use OIDC. The others fell back to a classic automation token — precisely the kind of long-lived, broadly-scoped credential that trusted publishing exists to remove. You’d end up with a project that looks secure on paper (it “uses trusted publishing”) while still carrying the exact risk the feature was meant to close, just for a smaller slice of its release surface.
Multiple configurations remove the excuse. There’s no longer a reason for any of your publishing paths to fall back to a stored token if each path is its own GitHub Actions workflow, GitLab pipeline, or CircleCI job — you register each one as its own trusted publisher and they coexist without interfering.
What this looks like in practice
Say a package publishes stable releases from .github/workflows/release.yml on a v* tag, and nightly prereleases from .github/workflows/canary.yml on a schedule. Before this change, you’d have registered one of those as the trusted publisher and left the other on a token. Now you register both:
# release.yml — stable releasespermissions: id-token: write contents: readjobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version: '24' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm publishThe canary workflow gets its own entry in the package’s Trusted Publisher settings — same repository, different workflow filename — and npm authorizes either one independently. Neither configuration needs to know the other exists.
Prefer stage-only where you can
npm’s own recommendation, worth taking seriously, is to configure trusted publishers for staging rather than direct publishing wherever your process allows it. npm stage publish is always permitted; letting a configuration also run npm publish directly is opt-in per configuration. Stage-only means every CI-triggered publish lands in a review queue — now gated on a clean malware scan — and a maintainer has to approve it with 2FA before it reaches the public registry. That’s a meaningful gap between “a workflow ran” and “code shipped to your users,” which is exactly the gap that a compromised CI job or a malicious dependency exploited during a build step would otherwise skip straight through.
Tighten token access once OIDC covers everything
Once every one of your publishing paths has a trusted publisher, go to Settings → Publishing access on the package and select “Require two-factor authentication and disallow tokens.” This is the step teams skip because it feels redundant — OIDC is already working, why touch anything else — but it’s what actually closes the door. A leaked or over-scoped automation token sitting unused in an org secret is still a live credential until you revoke it or the account-level setting refuses it outright.
This didn’t happen in isolation
Trusted publishing itself isn’t new — npm’s docs frame it as npm’s implementation of the OpenSSF’s Trusted Publishers standard, the same approach PyPI and RubyGems already ship, and GitHub took it generally available on July 31, 2025 with GitHub Actions and GitLab CI/CD support. CircleCI support and the multiple-configuration model came later. What’s notable is the pace of the follow-on work this year. In July, npm turned on automatic malware scanning for every newly published package, introduced a contentPolicy metadata field and a DISCLOSURE file requirement for packages whose legitimate functionality resembles malware to automated scanners, and started requiring that any package declaring that dual-use content publish through a 2FA-enforced path. The same July changelog wave restricted bypass-2FA granular access tokens. None of that is a coincidence — it’s npm closing off the token-based side doors one at a time while making the OIDC side more flexible, so there’s less reason left to reach for a long-lived credential at all.
Multiple trusted publishers is the piece that makes the OIDC side actually usable for teams whose release process isn’t a single linear workflow, which is most teams once you have more than a toy package. A one-configuration limit is fine for a demo repo that publishes on tag push and nothing else; it was never a realistic fit for a package maintained by a team running separate stable, prerelease, and internal-staging pipelines. Now the tooling matches the reality instead of asking the team to simplify their pipeline to fit the tooling.
Failure modes worth knowing before you rely on this
Configuration correctness isn’t verified at save time. npm doesn’t check that your repository, workflow filename, or environment name are actually correct when you add a trusted publisher — errors only surface when a publish fails. Double-check the workflow filename matches exactly, extension included, before you trust it in production.
workflow_call and workflow_dispatch break naive setups. If your publish step lives in a reusable workflow invoked via workflow_call, or is triggered manually via workflow_dispatch, npm validates against the calling workflow’s identity, not the one that actually runs npm publish. Both the parent and child workflows need id-token: write, and the configuration you register needs to match the calling workflow’s filename, not the reusable one.
Provenance doesn’t extend to CircleCI or private repos. Publishing via GitHub Actions or GitLab CI/CD from a public repository gets automatic provenance attestations bundled in; CircleCI publishes and any private-repository publish do not, regardless of how many trusted publishers you’ve registered.
Ten is the ceiling. If your release surface genuinely needs more than ten independent CI paths per package, you’re into split-package or monorepo-tooling territory rather than something trusted publishing alone will solve.
What we’d do about it
For anything we maintain that publishes to npm, this is worth an afternoon this week, not a someday item. Audit your publish workflows per package — how many distinct CI paths actually push to the registry — and register a trusted publisher for each one instead of leaving stragglers on tokens. Where a workflow’s purpose is anything other than a routine, low-risk stable release, set it to stage-only and let a human approval gate stand between CI and the public registry. Then, once nothing depends on a stored token anymore, flip on “require 2FA and disallow tokens” at the package level and actually revoke the tokens you find lying around in your org’s secrets — an unused credential you forgot to delete provides zero benefit and nonzero risk.
This is also a good moment to check whether your workflows use workflow_call or workflow_dispatch for publishing, since that’s the one place teams discover a trusted publisher “isn’t working” for reasons that have nothing to do with OIDC itself. If your CI setup mirrors what we build for clients — a static Astro front end backed by simple deploy pipelines, see how we approach a new website brief — the audit above is short, and it’s the kind of maintenance we fold into ongoing maintenance and support work rather than treating as a one-off project.
Sources
- npm trusted publishing with OIDC is generally available — GitHub Changelog (July 31, 2025)
- Multiple trusted publishing configurations for npm — GitHub Changelog (September 3, 2026)
- Trusted publishing for npm packages — npm Docs (last edited September 3, 2026)
- Staged publishing for npm packages — npm Docs (last edited May 20, 2026)
- npm publish-time malware scanning and dual-use metadata — GitHub Changelog (July 28, 2026)