Dev tools

GitHub adds stage-only npm tokens for automation, and sets January 2027 to remove bypass-2FA tokens

September 18, 2026 at 11:35 AM PT

GitHub changelog header image for stage-only npm tokens

Image: GitHub

Why it mattersA CI pipeline that used to publish npm packages with a bypass-2FA token now needs either trusted publishing or the new stage-only token, and a person to promote each stage into a release before January 2027.

GitHub added a new granular npm access token permission on 18 September: Read and write (stage only). Picking it lets an automated workflow submit a package version with npm stage publish, and only that. GitHub says npm rejects direct npm publish attempts with the same token, even if the token is configured to bypass two-factor authentication.

What is different from a normal automation token

A stage-only token still holds the other write permissions on the package: it can move dist-tags and deprecate versions. What it cannot do is release a version to users on its own. Every staged version waits for a person on the package to promote it, so the release step keeps a human in the loop while the build and upload step stays automated.

Requirements to use one are npm CLI 11.15.0 or later, Node.js 22.14.0 or later, two-factor authentication on the npm account, and publish access to the package.

Why this arrived now

npm is targeting January 2027 to remove direct publishing through bypass-2FA tokens. That is the mode most CI pipelines run in today: a machine token in a GitHub Actions secret, with 2FA disabled for that token so publishes do not need a code from a phone. After January 2027, that token can no longer call npm publish at all.

The clean path off it is trusted publishing, where npm accepts a short-lived credential minted by GitHub Actions for the specific workflow, and no long-lived token sits in a secret. Some projects cannot adopt trusted publishing yet, because they publish from an environment npm does not recognise, or because the release job runs outside GitHub Actions. GitHub describes stage-only tokens as "a migration path for token-based automation" for exactly those cases.

The recent supply-chain hits on npm packages, including the Shai-Hulud worm in September and the chalk and debug incidents earlier in the year, all involved a compromised maintainer token being used to push a malicious version directly. A stage-only token turns that specific attack into a staged version somebody still has to accept.

Teams that publish npm packages from CI now have three paths to plan for before the January 2027 deadline: move the release job to GitHub Actions and adopt trusted publishing, keep the current setup and swap the bypass-2FA token for a stage-only token plus a manual promotion step, or accept that publishing from that pipeline stops working and take releases back to a developer's machine. The middle path is the smallest change and the one this feature is built for.

Source

Source: GitHub

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

More from AI News

Claude Code 2.1.275 syncs skills from claude.ai to the terminal and stops plugin install scripts from running

Anthropic released Claude Code v2.1.275 on 17 September at 22:33 UTC. The release syncs skills and plugins enabled on a claude.ai account to any signed-in terminal session, adds a plugin install command that first offers to add the marketplace, and fetches plugins from npm with install scripts disabled.

Source: GitHubDev tools

GitHub Actions workflow execution protections reach general availability, and public repos get a pull_request_target default that enforces on November 2

GitHub Actions workflow execution protections went generally available on 17 September 2026, and public repositories get a default rule that disables pull_request_target with enforcement starting 2 November.

Source: Vendor blogDev tools

GitHub Actions adds cache-mode, a per-job control that blocks writes on pull_request_target by default

GitHub Actions added a cache-mode setting that limits each workflow or job to read, write, write-only, or none, and blocks cache writes on pull_request_target by default so an untrusted pull request cannot poison the cache the next trusted run reads.

Source: Vendor blogDev tools