npm Revokes Classic Tokens, as OpenJS Warns Maintainers About OIDC Gaps
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.
- Sarah Gooding

npm’s classic tokens are now effectively a dead end for publishing workflows. GitHub disabled classic token creation in early November, then moved the final cutoff to December 9, 2025, when remaining classic tokens were permanently revoked. Any release pipeline that still relies on a classic token will start failing until it migrates to a supported alternative.
GitHub and npm’s guidance to maintainers has been consistent: stop using classic tokens and switch publishing to either trusted publishing (OIDC) or granular access tokens with scoped permissions. For teams that stick with granular tokens, npm’s tighter defaults and caps mean token rotation becomes routine maintenance, not a one-time fix.
That push toward OIDC-based publishing is now running into a different set of warnings from OpenJS’s updated recommendations. Wes Todd, a senior software engineer at Netflix and longtime JavaScript ecosystem maintainer who participates in Node.js package maintainer efforts (including the OpenJS Security Collaboration Space), said the OpenJS guidance was prompted by “targeted attacks” and a “confusing and rapidly changing response” from GitHub.
“Gaps in design and implementation with the new OIDC Trusted Publisher workflows leave maintainers open to novel and increasingly difficult to detect gaps in their publishing setups," Todd warned.
"We do not recommend critical projects move to this new workflow, but instead focus on hardening their existing workflows. At least until the situation with CI publishing settles and we can all move forward with OIDC publish."
The Inherent Risks of CI Publishing
#A lot of the highest-impact publishing failures are not “npm bugs.” They come from how release automation can be triggered, modified, or quietly subverted.
Wes said OpenJS had to be careful about how much detail to publish, because misconfigurations and workflow gaps can become an attacker’s playbook.
“This has been an exceedingly difficult message to put together because of the complexity/gaps in existing workflows, but also because we have had to be sensitive about publicly sharing details that may lead to increased risk of compromise for popular packages that have already moved to TP," Todd said.
The main issue is what keeps showing up in incident after incident: attackers do not need npm access first. They need a path into whatever can run your release workflow.
The PostHog Shai-Hulud 2.0 post-mortem writeup shows how quickly CI can can be exploited as the entry point for obtaining npm publishing credentials:
PostHog's own package publishing credentials were not compromised by the worm described above. We were targeted directly, as were a number of other major vendors, to act as a "patient zero" for this attack.
The first step the attacker took was to steal the Github Personal Access Token of one of our bots, and then use that to steal the rest of the Github secrets available in our CI runners, which included this npm token. These steps were done days before the attack on the 24th of November.
The point is not that CI publishing is always wrong. It’s that CI publishing has failure modes that are easy to underestimate: workflow triggers, permission boundaries, and who can cause a release job to run matter as much as how the registry credential is issued. If a compromised GitHub identity can push a tag, edit a workflow, or trigger a release path, “no long-lived token” does not automatically translate into “no publish risk.”
Wes Todd put that in more direct terms, arguing that the missing control is not another token format, but mandatory friction at publish time:
“2FA is just right there, it stops this in it's tracks, and GitHub refusing to enforce it is a massive problem," Todd said.
“We need them to enforce it on OIDC publish or turn OIDC publish off until it can be enforced, and to treat this with the urgency it needs.”
Others in the JavaScript maintainer community echoed the same concerns across discussions in OpenJS' Slack instance, regarding defaults and enforcement.
Node.js Collaborator Jordan Harband distilled those sentiments in a response on Bluesky: "Every option, including 'no 2FA at all', *can* be made secure. The problem is that it shouldn't even be POSSIBLE to publish insecurely - and either way, defaults matter. OIDC and token-based publishing are default insecure, full stop."
Trusted Publishing (OIDC) Isn’t A Universal Upgrade Yet
#GitHub has positioned trusted publishing as the long-term replacement for token-based CI publishing, since it removes long-lived publish tokens from build systems. The timeline for revoking classic tokens was reactive in response to a surge in registry attacks and account takeovers that let attackers publish malicious updates through popular packages.
OpenJS' guidance describes CI-based publishing as a reasonable option for teams, but one that adds complexity and meaningful risk. It also highlights trade-offs like reduced public auditability when releases are done via bot accounts, and the reality that a CI compromise can lead to high-impact publishes with limited early warning.
The foundation is more cautious about recommending Trusted Publishing to secure critical packages:
npmjs.com’s implementation of Trusted Publishing is promising for JavaScript, but it’s not ready for critical packages just yet. Some controls, like even the possibility of enforcing 2FA, still need to mature to ensure maintainers aren’t exposed to hard-to-detect risks.
Their guidance is less about endorsing one publishing mechanism and more about urging maintainers to match controls to their risk level and release model. Todd contends there’s no single workflow that “solves” publishing security:
“If nothing else, I would like to drive home the point that security is a spectrum and a process. Not something you ‘solve’ in a single way," he said.
What OpenJS Recommends Right Now
#OpenJS lays out three current paths for maintainers: local publishing, hardened CI-based publishing, and trusted publishing, emphasizing that the right choice depends on project criticality and team structure. The guidance includes a quick reference for their current recommendations:

"As the largest and highest impact package registry on the planet, our community has an important role in also being a leader," Todd said. "I don’t believe our current model is working, and I hope we can fix it. But for now, I will just settle for us slowing down and being smart about changes we roll out.”
Token Revocation Won’t Fix CI Publishing
#Revoking classic tokens forces overdue migrations, but it doesn’t automatically make CI-based releases safe. Secure publishing needs enforceable defaults. If “publish insecurely” remains an available path, the burden stays on maintainers to assemble a perfect workflow under pressure, with consequences that spill downstream into millions of dependency installs.
The ecosystem is trying to move from “prove you have the secret” toward “prove this release happened the way maintainers intended,” with auditability that survives account takeover attempts and workflow abuse. Maintainers should expect more changes that push publishing toward stronger, more explicit guardrails and improved mechanisms that make it harder for a compromised repo or CI runner to quietly ship an update under a trusted name.
In the meantime, maintainers don't have the luxury of waiting until perfect defaults arrive. Migrate off classic tokens because you have to, then treat publishing like production access: restrict who can trigger it, add friction where it matters, and assume attackers will keep testing whatever automation the ecosystem normalizes next.




