Replies: 88 comments 160 replies
-
Beta Was this translation helpful? Give feedback.
-
|
Copying some feedback here from our Slack discussion:
Additionally, see #174508 for some impact from the expiry and automation token removal. |
Beta Was this translation helpful? Give feedback.
-
|
There’s also some still valid and unaddressed feedback in the discussion around the OIDC / Trusted Publishing launch, such as eg my comment there: https://github.com/orgs/community/discussions/161015#discussioncomment-14419367 |
Beta Was this translation helpful? Give feedback.
-
|
From https://docs.npmjs.com/trusted-publishers
Is this support planned to be released before deprecating legacy classic tokens? We use GHES with self-hosted runners in our publishing workflow, and would like to switch OIDC / Trusted Publishing. It would be a breaking change for us to no longer be able to use legacy classic tokens with no ability to use OIDC instead. |
Beta Was this translation helpful? Give feedback.
-
|
There's a lot of good feedback elsewhere in these discussions but I want to make my take public outside of the slack as well. I'm going to go through the bullet points in the github blog post and then provide my own additional requests at the bottom. Current Planned GitHub / NPM Action Items
✅ This is good, get rid of them. Scoped and granular tokens are intrinsically more secure and the developer pain of "ah darn I gotta run
✅ Again, this is great. I had this as an item in an unpublished blog post that NPM should do. It effectively moves NPM from "2fa" to "phishing resistant" 2fa, which if in place 2 months ago would have prevented several of the initial compromises we saw hit the npm registry due to phishing attacks against maintainers (some of whom had 2FA and got their TOTP mitm'ed). To be clear, this is going to be quite annoying for so many people. Not in the least me, Electron publishes ~50+ packages all using TOTP codes (securely sent via http://github.com/continuousauth to github actions) that all need to be migrated to trusted publishing. But this is work we were going to do anyway because we'd already made our own conclusions about trusted publishing being the more secure future.
❓ This one is rough, there is currently an unsolved "Enterprise" usecase here that I will outline in "Missing Pieces" below.
✅ Finally, yes, thank you. Guiding developers towards the more secure option by default is a quick and easy win here that doesn't impact any existing package.
✅ Yessss. Thank you. Forcing 2FA for everyone is the single biggest win out of all of these, if you run Make everyone have secure phishing resistant 2FA, and then force everyone to use it 💯
❓ This one is also rough, but not because I'm against the idea, I'm wary of the implementation. See the "other OIDC providers" bit in "Missing Pieces" below Missing PiecesLet's pretend that everything in the above list shipped, what are we still missing to have a secure and simple package publishing strategy that works for everyone who currently uses npm Trusted Publishing should be One WayOnce you opt in to Trusted Publishing and publish your first release with it, that should be a one way choice only changeable in extreme cases with intervention from npm support. Currently just having access to a maintainers npm account effectively let's you perform a "downgrade" attack on them by removing trusted publishing and/or changing publishing settings. Once a package is published the Super Safe way, it should only ever be publishable that way. Trusted Publishing should use repository ID not nameThis is a common issue I see with github apps and other github integrations, I'm disappointed to see it from npm. By validating the owner name and repository name you are intrinsically creating the following issues:
The current UI in npmjs.org needs to be an actual dropdown of repositories using github oauth to provide a list and then internally it should validate the Trusted Publishing should set up and enforce github environment usageCurrent GitHub environment usage for trusted publishing is a manual and optional step, in addition to the above once you have an oauth token for the users github account, set up the environment for them. Enforce the environment can only be used on the This should be a series of clicks in the UI, not a custom yaml file, a hand crafted environment and manually typing in repo org and name. Trusted Publishing should disable all other legacy forms of publishing when activeCurrently even with trusted publishing enabled, a compromised maintainer account with a TOTP mitm can still publish these packages. Having Trusted Publishing active should just make all other forms of publishing disabled, regardless of how much auth you provide. See The Enterprise Usecase and Other OIDC ProvidersThese two I don't have an answer for, but calling them out anyway. Enterprises use self hosted runners, even to publish open source packages, they also use CI systems that aren't github actions or gitlab. What's the story going to be for them, enterprises with self hosted CI (Jenkins, BuildKite, CircleCI, etc.) should still be capable of publishing packages safely without having to manually update a token every 7 days 🤔 I would like to see a plan for that. |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
-
|
Here is a new post with changes we are applying first as part of this program. Please take a look and thanks for the continued feedback, as it is helping us doing some fine adjustments to the new measures we are implementing. |
Beta Was this translation helpful? Give feedback.
-
|
I think npm accounts should be as important as... I don't know, Apple developer accounts. Great to see that security updates are being made! |
Beta Was this translation helpful? Give feedback.
-
|
If you're going to force people to generate new tokens by forcing (short) expiry windows, at least make it easy for them to regenerate tokens using the previous configuration. As someone who has been using short-ish expiry windows already, this has been by far my biggest frustration with it - this feature has been long overdue... If a token of mine expires, I probably need one with the same granularity to replace it, so give me that option. If not, I think many developers will just generate overly permissive tokens because it's easier than specifying one package per token (again, I have considered this but luckily I don't publish that often). I believe this would contribute significantly to preventing attacks as a leaked token for one project wouldn't allow publishing all the package maintainer's other tokens. See also my earlier piece of feedback: npm/feedback#1088 |
Beta Was this translation helpful? Give feedback.
-
|
Please clarify the scope for this. It's linked from the main GitHub page; is it only for NPM or is it for everyone? I believe there are some things that you can do with classic access tokens that you cannot do with fine-grained tokens |
Beta Was this translation helpful? Give feedback.
-
|
One thing we seem to be skipping over: GitHub environments should have an option to require 2fa All of these npm changes are fine if there's 2FA in the trusted workflow. Currently, you can already bind a trusted workflow to an environment in that it must be run through that to be considered trusted. In reality the only reason anyone is complaining about the changes so far is because such a flow doesn't exist. The flow should basically go like this:
Admittedly this isn't an npm change but given how we're all being pushed to use GitHub for publishing, it's a very important feature to make the whole picture work. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks for this post. Some questions about To be able to run Right now, the
How will this be impacted by these changes? The github blog post does not address this issue. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the post. Related specifically to the Shai Hulud attacks I saw mentioned in the article that there are controls in place to prevent packages with Shai Hulud IoC's from being published. Can you detail that for me? We are trying to assess if NPM/Github has this under control or if we need to build out additional checks for Shai Hulud effected packages (Search for IoC's ourselves). |
Beta Was this translation helpful? Give feedback.
-
|
Our company has its own CI system and we do some npm package publishing using long-live tokens. We would like to migrate to Trusted Publishing, yet documentation says that it does not have wide support, nor is there any clear directions on how to implement Trusted Publishing for custom CI systems. With long-live tokens going to be revoked in mid-November, does that mean our only option is to |
Beta Was this translation helpful? Give feedback.
-
|
Will long-lived classic tokens with read-only scope (not able to use for publishing) will also be revoked? They're useful for granting read-only access to packages in a private scope and don't pose security risk like publish tokens. |
Beta Was this translation helpful? Give feedback.
-
|
Is there a way to use Github actions to generate a new token? We could then use that as a jumping board to update a token in a CircleCI context. |
Beta Was this translation helpful? Give feedback.
-
|
No you cannot use GitHub as a jump point for new tokens that would be
redundant in in in they can just capture the traffic and still inject
maliciously
…On Thu, Oct 30, 2025, 10:53 AM Mike Wyatt ***@***.***> wrote:
Is there a way to use Github actions to generate a new token? We could
then use that as a jumping board to update a token in a CircleCI context.
—
Reply to this email directly, view it on GitHub
<#174507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BING55RFQFKPO6ZUCRIPU5T32IQ6LAVCNFSM6AAAAACHJT4IZ2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIOBSHAYDQMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Just a heads up guys if anyone is using any type of ai to create scripts
they are giving the bad npm tools without understanding the supply chain
attack claude code gave me a bad package and now i have 2k sychost running
and gotta dump my whole 300gb and 3 new transactions on my wallet 2 zcash
gone 27 dollars in eth gone this am
…On Fri, Oct 31, 2025, 10:10 AM Lucas Pimenta ***@***.***> wrote:
Hey guys I have a question about the classic tokens deprecation:
Will this deprecation affects Github Packages authenticated with PAT -
Personal Access Token(classic) as well?
In Github Packages documentation, they enforce that has just this type of
authentication:
image.png (view on web)
<https://github.com/user-attachments/assets/50771de7-f7fd-4fd5-8da1-570f6551691f>
I'm using this type of authentication for some private packages and I'm
not sure if this deprecation will affect my workflows.
—
Reply to this email directly, view it on GitHub
<#174507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BING55QZ7BLDOGME7NATHE332NUWZAVCNFSM6AAAAACHJT4IZ2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIOBTHA4TEMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
We have migrated all of our various actions to use OIDC, but now our nightly automation around |
Beta Was this translation helpful? Give feedback.
-
|
Subject: Great initiative on the npm Security Improvement Plan Hi team, Thanks for sharing this detailed post and for proactively focusing on the security of the npm ecosystem. As a developer, supply chain security is a top concern, and it's great to see you addressing it head-on. I've read through the proposed plan, and I'm particularly supportive of the initiatives around [mention a specific part of the plan you like, e.g., enhancing 2FA enforcement or improving package integrity checks]. This seems like a strong and necessary step forward. I have a couple of clarifying questions to better understand the rollout: What is the expected timeline for these changes? Will they be rolled out in stages? Regarding the [mention another specific part, e.g., "new publishing verifications"], could you share a bit more about how this will impact the daily workflow for developers? For instance, what will the experience be like if a package fails one of these new checks? One suggestion I'd like to offer is [add a brief suggestion or area you think they missed, e.g., "to also consider providing more tools for automated dependency auditing within CI/CD pipelines"]. Overall, this is a very welcome direction. I appreciate the team's transparency and the chance to provide feedback. Looking forward to these improvements! |
Beta Was this translation helpful? Give feedback.
-
|
I'm fine with TOTP. I totally dislike using passkeys. |
Beta Was this translation helpful? Give feedback.
-
|
Is supporting GitHub reusable workflows on the list? I spent a few hours fighting with publishing because reusable workflows were not supported and it isn't documented (explicitly) that they are not supported. Here is a sample publish workflow that works fine with manual runs and release triggers (assuming you generate a release with a non-default token), but not with reusable workflows.
name: ' 🚀 Publish: Publish to NPM (automatic)'
on:
release:
types:
- published # will only trigger if you use an app token or PAT when creating the release.
workflow_dispatch:
inputs:
ref:
type: string
description: 'The git ref (branch or tag) to publish'
required: false
workflow_call:
# note this flow won't work until NPM adds support for reusable workflows
inputs:
ref:
type: string
description: 'The git ref (branch or tag) to publish'
required: true
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Publish Package
run: npm publish
env:
NPM_CONFIG_PROVENANCE: trueIf I am reading the docs right, according to Using OpenID Connect with reusable workflows - GitHub Docs, NPM needs to check a combination of Current NPM Trusted Publisher setup:
Request: add ability to add multiple optional workflows that can call |
Beta Was this translation helpful? Give feedback.
-
|
Are granular tokens going to receive more updates? I understand that support for cli ( Comparing with GitHub Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
I have just finished migrating my 3rd repository to a Trusted Publisher. It is a painful experience since it isn't clear why things would be failing:
Some clean documentation on what is needed to publish using a Trusted Publisher would be very helpful. Most of the documentation is out of date. Do you have any influence on the docs? This one is out of date: Generating provenance statements | npm Docs. It says npm |
Beta Was this translation helpful? Give feedback.
-
|
tl;dr; Trusted Publishing: I'm using Trusted Publishing (OIDC) from GitHub Actions for the I noticed that packages published via Trusted Publishing don't show up when querying the registry search API with
One concrete example package is Questions:
Thanks for your help and for the work you're doing on supply-chain security and provenance. |
Beta Was this translation helpful? Give feedback.
-
|
I'm currently blocked from migrating to Trusted Publisher until it supports org-wide setup. This deadline you gave us is insanity. |
Beta Was this translation helpful? Give feedback.
-
|
In the OpenJS Security Collab Space, we recently published a guide on secure npm publishing practices: “Publishing Securely on npm”. It includes sample repos and practical workflows that many open-source maintainers can adopt today. Below is the quick-reference table from the guide, comparing the three main publishing approaches: Quick Reference
Key takeaways from our analysis
Our focus in the guide is helping maintainers choose the publication model that fits both their project scale and their security posture today, while preparing for workflows that will become safer over time. Happy to discuss details or provide deeper examples if helpful. |
Beta Was this translation helpful? Give feedback.
-
|
This hasn't been explained well. But as much as I hate to admit it, the deprecation of TOTP aka Google Authenticator actually does make sense:
I'm just glad that 1password supports passkeys, so I don't have to change my workflow and buy deeply into particular OS ecosystems in order to participate. (*) Public/private key cryptography is involved too. Offhand I'm not sure if that's any additional defense against a proxy. But it doesn't matter, because it's sufficient that the browser remembers the domain and is not fooled into performing the passkey dance on a malicious phishing proxy site. |
Beta Was this translation helpful? Give feedback.
-
|
You can still create classic tokens by navigating to https://www.npmjs.com/settings/USERNAME/tokens/new They work too. They just aren't listed under your /tokens page. |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We recently published a post about our plan to improve security on npm as a supply chain supplier and I'd love to gather everyone's feedback.
Please use this thread for general feedback. Other threads might be pinned as well as they get popularity as I want to keep free formatting for all.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions