Trusted Publishing
Trusted publishing is a way to publish packages to a registry such as npm or PyPI from a CI/CD workflow without a stored API token: the workflow presents a short-lived OpenID Connect (OIDC) identity token from its CI provider, and the registry exchanges it for a short-lived publish credential if it matches a publisher configuration the maintainer registered.
On PyPI the resulting API token is valid for 15 minutes; npm supports GitHub Actions, GitLab CI/CD and CircleCI (npm CLI 11.5.1 or later) and adds provenance attestations automatically for public packages published from GitHub or GitLab. It removes the long-lived publish token that worms such as Shai-Hulud harvest from laptops and CI, but the trust is only as good as the identifier the configuration binds to. In October 2026 Bloom Security's SlugFest research showed npm matched repositories by owner and name until the first publish, so anyone who reclaimed a renamed or deleted repository name could mint publish credentials for more than 1,500 packages. Maintainers should publish once right after creating a binding, review bindings after any rename or transfer, and remove them before deleting a repository.
See also: workload identity federation, OIDC, secrets in repositories and CI, Shai-Hulud reaches the Tensorlake npm SDK
Where this term is explained in depth
Guides and references
- GitHub Actions OIDC to AWS and Azure without long-lived keysRecipe
- Non-Human Identity (NHI) Security: The 2026 GuideGuide
- OAuth 2.0Standard
- OAuth Transaction Tokens (Txn-Tokens)Standard
- What Is a Non-Human Identity (NHI)? NHI Management ExplainedGuide
- WIMSE (Workload Identity in Multi-System Environments)Standard
- Workload identity 101: replacing long-lived secretsGuide
Non-human and workload identity glossary
Identities for services, pipelines and machines, and how to replace static secrets with short-lived, verifiable credentials.
Go deeper: WIMSE (Workload Identity in Multi-System Environments), OAuth Transaction Tokens (Txn-Tokens), OAuth 2.0, What Is a Non-Human Identity (NHI)? NHI Management Explained, Workload identity 101: replacing long-lived secrets, Non-Human Identity (NHI) Security: The 2026 Guide
Related on Start with Identity
- GlossaryAPI Key
A static secret string used to authenticate an application or caller to an API. Simple but weak: it does not expire on its own, is easy to leak, and should be v
- GlossaryCredential Brokering
Credential brokering is the pattern in which an intermediary fetches a credential from a vault or credential store at the moment of access and hands it to an al
- GlossaryMachine Identity
A machine identity is the credential that lets a device, server, application or workload prove who it is to another system without a person signing in: most oft
- BlogLXD and MicroCloud flaw let attackers pose as any trusted client using only its public certificate
Canonical's CVE-2026-112816 let an attacker authenticate to the LXD and MicroCloud HTTPS API as any trusted client by attaching that client's public certificate
- VendorThales SafeNet Trusted Access
strong