
GitHub has officially announced the release of npm version 12 with install scripts disabled by default, along with deprecating granular access tokens (GATs) designed to bypass two-factor authentication (2FA).
The Microsoft-owned subsidiary noted that the following npm install behaviors that used to run automatically before have been made opt-in –
To review and approve trusted scripts, users are now required to run: “npm approve-scripts –allow-scripts-pending,” then commit the resulting allowlist in the “package.json” file.
It’s worth noting that these changes were previewed last month, with GitHub recommending developers to upgrade to npm 11.16.0 or newer, run the normal install command, and review the warnings displayed.
The latest npm release version also introduces two new changes –
The first of two changes is expected to take effect in early August 2026. In the interim, it’s advised to stop using 2FA-bypass tokens for the aforementioned operations and perform them interactively with 2FA. The second change is scheduled for January 2027.
“To prepare, plan to move automated publishing to trusted publishing (OIDC) or staged publishing with a human approval step, rather than a long-lived publish token,” GitHub said.
The development comes as pnpm 11.10 introduces a new “_auth” setting for configuring registry authentication as a single structured, URL-keyed value.
“The security benefit is that the credential and the host it belongs to travel together, and pnpm reads _auth only from the environment or the global config, never from a project’s files,” Socket explained.
“That means a malicious or compromised pnpm-workspace.yaml or .npmrc inside a repository cannot point a valid token at a different host. A tampered project file is a common way attackers get a foothold, and redirecting a registry token is a direct route to stealing it, so closing that path removes exposure.”
#chain #default #disables #install #news #npm #reduce #risk #scripts #supply — News
© Bulletproof Servers. All rights reserved.