
GitHub has formally introduced the discharge of npm model 12 with set up scripts disabled by default, together with deprecating granular entry tokens (GATs) designed to bypass two-factor authentication (2FA).
The Microsoft-owned subsidiary famous that the next npm set up behaviors that used to run mechanically earlier than have been made opt-in –
- allowScripts defaults to off, which means dependency lifecycle scripts (i.e., preinstall, set up, postinstall) and implicit node-gyp builds now not run until explicitly allowed.
- –allow-git defaults to none, which means –allow-git defaults to none: Git dependencies (direct or transitive) are now not resolved until explicitly allowed.
- –allow-remote defaults to none, which means dependencies from distant URLs (e.g., https tarballs) are now not resolved until explicitly allowed.
To evaluation and approve trusted scripts, customers are actually required to run: “npm approve-scripts –allow-scripts-pending,” then commit the ensuing allowlist within the “package deal.json” file.
It is price noting that these modifications had been previewed final month, with GitHub recommending builders to improve to npm 11.16.0 or newer, run the conventional set up command, and evaluation the warnings displayed.
The most recent npm launch model additionally introduces two new modifications –
- npm GATs configured to bypass 2FA will now not be capable of carry out delicate account, package deal, and group administration actions. This consists of creating or deleting tokens, producing restoration codes and altering npm account password, electronic mail, profile, or 2FA configuration, altering package deal entry, maintainers, or trusted publishing configuration, and managing group and crew membership in addition to their package deal grants.
- npm GATs will now not retain the power to publish straight. Their publishing floor shall be restricted to studying non-public packages and staging a publish, the place a package deal solely turns into public after a human 2FA approval.
The primary of two modifications is anticipated to take impact in early August 2026. Within the interim, it is suggested to cease utilizing 2FA-bypass tokens for the aforementioned operations and carry out them interactively with 2FA. The second change is scheduled for January 2027.
“To arrange, plan to maneuver automated publishing to trusted publishing (OIDC) or staged publishing with a human approval step, quite than a long-lived publish token,” GitHub stated.
The event comes as pnpm 11.10 introduces a brand new “_auth” setting for configuring registry authentication as a single structured, URL-keyed worth.
“The safety profit is that the credential and the host it belongs to journey collectively, and pnpm reads _auth solely from the atmosphere or the worldwide config, by no means from a mission’s recordsdata,” Socket defined.
“Meaning a malicious or compromised pnpm-workspace.yaml or .npmrc inside a repository can’t level a sound token at a unique host. A tampered mission file is a standard method attackers get a foothold, and redirecting a registry token is a direct path to stealing it, so closing that path removes publicity.”

