Replies: 6 comments 3 replies
This comment has been hidden.
This comment has been hidden.
|
The primary thing that is needed here, imo - which would have worked even in a world with full TOTP tokens, no staged publishing, no provenance, and no OIDC/trusted publishing - is the capability in a GitHub Actions workflow to pause, prompt a maintainer with predetermined form inputs, allow the maintainer to submit the form, and then resume with that input. That generic capability would make it trivial for me to, for example, run |
|
The other day I set up OIDC for a bunch of packages in an org and I probably entered my OTP 20-30 times to do so. If you're doing a single package I think you need to enter your OTP at least 3 times. You have to enter it to login. I have to login almost every time I use npm (the CLI). Then to see the Settings page you have to enter the OTP. To save a connection, another OTP. I might be missing one. Oh, to publish the initial version (which you must do before these pages exist, of course), OTP. So a minimum of 4 times to set up a new package. I guess I have two wishes from this:
|
|
I'd really like to see a fix for npm/cli#8547 on the roadmap for 2026. |
|
I have a monorepo with 70+ packages. A publish that fails halfway leaves consumers that target I currently work around this by giving all packages a throw-away dist-tag when I publish them. And then once all are published and verified I switch them all to the |
|
For me, only allowing one trusted publisher per package, keyed by workflow file name, is forcing me to manage all my publishing (canary, RC, stable, cleanup) through one file. Some more flexibility here would be great, so I for example could have one workflow per type of release I want to make. (And if you wonder what "cleanup" is, it's for cleaning up orphaned dist-tags from broken releases) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone, Leo here, npm's PM.
I want to share what we’ve shipped since May, where we’re focusing for the rest of 2026, and what we’re considering for 2027. I also want your feedback: what would make npm safer while making it easier to publish and consume packages?
Our immediate priority is making safer publishing practical across the workflows maintainers actually use. That means improving the alternatives before removing direct publishing through granular access tokens that bypass two-factor authentication.
We’ve heard requests for more Trusted Publishing providers, more flexible permissions, and better visibility into publishing. Those requests matter. Here’s how they fit together—and why we’re sequencing the work this way.
What’s changing, and what isn’t
Changing: bypass-2FA granular access tokens will no longer be able to publish a version directly. We announced this in July.
Not changing: token-based automation itself. Your CI can still run unattended. The publishing path becomes stage from automation, then approve with 2FA. Trusted Publishing workflows, scoped and private package publishing, and normal interactive
npm publishwith 2FA are unaffected.A minimal migration looks like this—automation stages, a human releases:
If you use Trusted Publishing, you can continue to use
npm publishto publish directly instead of relying on a stored token.What we’ve shipped since May
These changes address different parts of the same problem: protecting maintainer accounts, reducing what compromised credentials can do, and giving consumers more control over what they install.
Our focus for the rest of 2026
We’re evolving granular access tokens around what automation actually needs: preparing releases, without giving a stored credential the authority to publish them. Automation handles preparation; a person authorizes publication. Possession of a CI token alone is no longer enough to release a version.
To make that transition workable, our current priorities are:
dist-tagoperations, so more of your release workflow can work without a separate token.These are our priorities for the remainder of 2026, rather than individual delivery-date commitments. The goal is not just to remove a risky capability. It’s to make the safer path usable for maintainers releasing one package or coordinating many.
If you publish on a schedule, or release many packages at once, we especially want to hear from you. Nightly builds and large monorepo releases are the cases where “a maintainer approves with 2FA” adds the most friction. Batch approval and publishing plans are aimed squarely at this, and we’d rather find out now if we have the shape wrong.
Why additional Trusted Publishing providers come next
If your CI provider isn’t supported, that is a real workflow gap. Token management and rotation add work, and asking for a token-free integration is reasonable.
We’re prioritizing improvements that make staged publishing usable across CI/CD systems before taking on additional provider integrations. We want npm to work well for maintainers on any CI/CD system, which is exactly why we’re improving the provider-independent path first.
Staged publishing is not the same as native OIDC support: token-backed staging still requires credential management, and promotion adds an approval step. We’re not presenting it as complete parity. It is a broadly usable migration path while we work toward wider token-free support.
Adding a trusted provider also requires more than recognizing an OIDC token. We need to evaluate the identity claims and security controls behind the publishing authorization. We want to make that integration process more repeatable, while maintaining a meaningful trust standard.
For that reason, we’re not planning additional provider integrations during the remainder of 2026, but we plan to expand support including new trusted publishing providers as part of our work for 2027.
What we’re considering for 2027
These are directions we’re evaluating, not a committed delivery schedule or an exhaustive list:
dist-tagoperations, and more.We’ll prioritize this work using security impact, community feedback, conversations with maintainers, and evidence about the workflows and providers people use to publish to npm.
Help shape what comes next
I’d like to hear from both publishers and package consumers:
Specifics help us a lot here: what you’re trying to do, and where the experience falls short. You don’t need to propose a solution. I’ll be reading this thread through the end of this semester and will follow up in January with what we heard and how it changed our plans.
Thanks for helping us make npm safer and better to use.
All reactions