npm Trusted Publishing Adds Support for Dist-Tag Management via OIDC

A glowing glass digital tag connected to a metal padlock on a dark background.

GitHub has expanded npm trusted publishing capabilities to allow maintainers to manage package dist-tags using short-lived OpenID Connect (OIDC) credentials. The updated system eliminates the requirement to store long-lived access tokens to modify version pointers such as latest, next, or beta.

Closing the Token Gap in Automated Pipelines

Before this update, trusted publishing supported package publishing and staging operations, but it did not cover dist-tag management. Open-source maintainers who adopted token-free workflows were forced to maintain traditional granular access tokens in their continuous integration workflows strictly for post-release tagging or handling rollbacks.

With short-lived OIDC tokens now supporting these operations, maintainers can completely transition automated release pipelines away from persistent secret storage, reducing the attack surface associated with leaked or compromised access tokens.

Granular Controls and Backward Compatibility

The new access right operates as an explicit opt-in setting labeled 'Allow npm dist-tag' within a package's trusted publishing configuration. GitHub defaults this permission to off for both pre-existing and newly added configurations, ensuring no workflow gains elevated access automatically.

The dist-tag permission works independently from direct package publishing settings, allowing developers to assign tagging permissions to staging-only setups if needed. An incoming OIDC token authorizes a dist-tag modification if it matches any active configuration with the setting enabled. Meanwhile, legacy workflows relying on conventional access tokens continue to function without interruption.

AI-generated editorial illustration; not a documentary photograph.

Source: Opt-in dist-tag permissions for npm trusted publishing

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *