megachangelog
Feature

Stage-only npm tokens for safer automation

GitHub now supports creating npm granular access tokens with Read and write (stage only) permissions, allowing automated workflows to stage package versions for review without requiring full publish access.

You can now select Read and write (stage only) when creating an npm granular access token. This lets your automated workflows stage package versions for review without giving the token permission to publish new versions directly to the npm registry.

Your workflow uses npm stage publish to submit a version. A package maintainer then reviews and approves its release with two-factor authentication (2FA). npm rejects direct npm publish attempts with that token, even if you’ve configured it to bypass 2FA for automation.

Stage-only tokens retain other package write permissions, including moving dist-tags and deprecating versions. Protect them with the same care as any other write token.

Prepare your automation for the token transition

This release is opt-in and doesn’t change existing tokens or their direct-publish capabilities.

As previously announced, npm is targeting January 2027 to remove direct publishing through bypass-2FA tokens. If you can’t move to trusted publishing yet, stage-only tokens offer a migration path for token-based automation.

To get started:

  1. Create a granular access token with Read and write (stage only) permissions for the packages your workflow needs.
  2. Replace your workflow’s publishing token and use npm stage publish instead of npm publish.
  3. Have a maintainer review and approve staged versions with 2FA.

Staged publishing works with existing npm packages. You’ll need publish access to the package, 2FA enabled on your npm account, npm CLI 11.15.0 or later, and Node.js 22.14.0 or later.

Learn more about staged publishing, and share questions or migration blockers in the npm community discussion category.

The post Stage-only npm tokens for safer automation appeared first on The GitHub Blog.

npmtokenssecurityautomationci-cd

Source: original entry ↗

More from GitHub

Follow GitHub to get its new changes in your feed and email digest.

Feature

Copilot model policy API for enterprise, orgs, and teams

REST API endpoints now available to retrieve and update Copilot model policies for enterprises, teams, apps, and organizations, enabling centralized policy management at scale.

copilotapienterprisepolicymanagement
Announcement2026.10.19

GitHub Copilot models deprecated

GitHub has deprecated certain models across GitHub Copilot experiences including Chat, inline edits, and code completions, effective October 19, 2026. Users may need to migrate to supported models.

copilotmodelsdeprecationai
Announcement

Some Git over HTTPS may temporarily require authentication

GitHub may temporarily require authentication for clones and fetches of public repositories over HTTPS during periods of unusual traffic to protect service availability.

githttpsauthenticationavailabilitytraffic
See all GitHub changes →