Replies: 22 comments 17 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) |
|
The staged publishing approach makes sense, especially for security. For large monorepos, though, approving packages one by one could become painful. Batch approval and publishing plans would be really useful to make the transition practical. |
|
I don't know what GitHub's or npm's definition of "broadly usable" is, but so far it's looked like continuing to degrade the experience for anyone (including paying customers) not using one of three blessed CI providers while ignoring concerns for months and then downplaying the impact when finally hinting at addressing them at an undetermined time that may be sometime next year but may leave us waiting until the 2030s. Asking for specifics on CI providers and other details here also feels disingenuous considering the dozens of comments on preceding posts around these changes that have provided those kinds of answers over and over. |
|
My feedback is over at https://github.com/orgs/community/discussions/207561 - mainly I've been seeing a lot of issues with regards to the malware scanning. It's been ineffective at catching the vulnerabilities since it launched as well as it's been hampering publishes for hours sometimes which I've also heard from multiple people now. I'd love if we could plug external validators like aikido.dev, socket, ... into the staged publishing thing and enable that external party to report approval alongside maintainer approval. This would allow us to setup secure pipelines where multiple maintainer approval, ... is required. |
|
I'd like to see a freeze on changes outside of critical security updates until a better QA proccess is put into place. My npm package deployment pipeline broke after changes made last year. I'm not wasting my time repeatedly fixing my deployment workflow to keep up with breaking changes. |
|
I know publishing needs to be the top priority, but there are some tooling aspects I hope are considered as well. In nvm-windows v2, we've put effort into local toolchain security and E2E guarantees (i.e. assure you're running the intended npm version and not evil-agent dressed up as npm). This includes a code-signed npm shim, i.e. For example, some ASP.NET core tools explicitly look for There needs to be some guidance steering people away from using hard-coded npm entry points. I have thoughts on the shape of this (happy to offer my feedback if there is a desire for it), but just having some kind of official statement from npm would go a long ways for those of us trying to securely integrate with npm tooling. |
|
I know y'all are stretched thin, so to me the best thing you can do is prioritize features which enable more automation and for external tooling to fill in the gaps. For me, the biggest issue is how staged approvals work. I want to build my own tooling (or use 3rd party tools) with malware scanning, multi-party approval logic, and batched approvals (this one is very important!). I'm ok with owning the security around this - but we need a new capability for an API key which can only do approvals, and to disable approval for the package any other way. I've laid it out here in this discussion - would love some kind of response. |
|
What would make trusted publishing easier is better error messages. Npm doesn't even log OIDC failures by default. A good PM cares about the error experience as well as behavior in successful conditions, and specifies what the error experience should be before it becomes an oversight |
|
Rejections from the scan should be informative. The package disappearing from the staged list with no email notification is making the false positives harder to deal with than necessary. I was babysitting a publish and at one point one of the packages waiting for a scan disappeared from the staged list with no notification or information why. I'm assuming it didn't pass the scan this time (README was the only change) |
This comment was marked as low quality.
This comment was marked as low quality.
|
An audit log within |
|
@leobalter to answer your question about release workflow friction: we currently use TeamCity in our organization and we only recently started releasing packages to the public registry. We're looking into automating it and the work is underway. The provider situation is the annoying part: no trusted publishing for TeamCity means either long-lived tokens we'd have to migrate off later, or staging + approval in the loop. Worth noting JetBrains shipped an OIDC JWT plugin for TeamCity in September (TeamCity 2025.11+) that seems to cover the CI side of trusted publishing: short-lived audience-scoped JWTs, JWKS, configurable issuer for servers not exposed to the internet (source). Might make TeamCity a lower-effort candidate for the 2027 provider expansion than a from-scratch integration. |
|
Once again, similarly to the previous thread, noting it's ridiculous that NPM--a product owned by GitHub--doesn't even support trusted publishing for GitHub orgs with data residency ([org].ghe.com hosted) while forcing through these changes.
My team publishes multiple packages on a regular ~weekly cadence. We used trusted publishing--until our org forced through migrating to GH w/ data residency which required reworks back to granular tokens and added wasteful overhead managing tokens. Now, in January, you're going to waste more of our resources trying to coerce people to trusted publishing that's literally impossible for us to implement or we'd already be using it. Our org pays NPM/GH over $100,000/mo; it feels ridiculous we need to keep wasting engineering time just to be able to have seamlessly functioning CI for publishing NPM packages. Is the auth even any different for .ghe.com instances vs standard GH? Are you going to waste more of our engineering time breaking our publishing flows again than it'd take one NPM engineer to add an additional field to route the same formed request to [org].ghe.com instead of github.com? It's not helpful to plan to get around to it some ambiguous time in 2027 after already breaking things more again before, when it is finally added, needing to invest engineering time to update publishing flows again. It's poor product management to force a transition when it's literally impossible for so many end users to adopt the preferred behavior. |
|
I have a flow where CI automatically publishes every week if there are changes. Requiring a human to approve the publish every time with 2FA would be extremely inconvenient and wasteful of time. It also means needing to grant access to the npm package to more people, so they can approve the published versions, which seems like it actually decreases security. The migration path that requires this for CI that doesn't use the currently supported trusted publishes is not "boradly usable". And "trusted publishing" is problematic, not just because we don't use one of the currently supported CI providers, but because we use self-hosted CI inside a private network. Adding additional cloud providers isn't enough. You also need to have some way to support a custom, self-hosted CI system that doesn't have a publicly accessible Identity Provider. |
|
Perhaps @favware/npm-deprecate, an example I used in the What are your thoughts, @leobalter? |
|
I love the idea of staged publishing, not only for larger monorepos but also to plug-in my own tooling and verify the staged package before hitting release. I am aware that staged publishing is currently build primarily as a tool to allow use of tokens without 2FA. However I think there's also a pretty good use case to use OIDC permissions (trusted publishing) to publish staged packages. Imagine the following scenario:
Worst case, publishing staged packages using OIDC does not lower the security bar compared to publishing with OIDC right away. |
The placeholder version should be automatically unpublished when the staged version is published, disallowed to be downloaded (throw an error when tried to be downloaded), or able to be unpublished any time. |
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