Repository navigation
Description
[RRFC] Feature Request: Add Bitbucket Pipelines as a trusted NPM publisher
Motivation
Npm currently does not support Bitbucket Pipelines as a trusted publisher and now that classic tokens are no longer supported we want to ensure users are able to publish to NPM without being reliant on tokens.
This will allow us to stay up to date with security best practices and allow users to enable NPM into their CI/CD workflow more easily.
We have added the ability to enable NPM as an audience so this integration is possible
source: https://github.blog/changelog/2025-11-05-npm-security-update-classic-token-creation-disabled-and-granular-token-changes/
source: https://docs.npmjs.com/trusted-publishers
How
Current Behaviour
Currently bitbucket pipelines is not a trusted publisher so users have to rely upon tokens to publish to NPM.
Desired Behaviour
Currently Github Actions & Gitlab CI/CD are able to be selected as a publisher with configurations to control publishing access we want an equivalent for Bitbucket Pipelines that looks something like:
Publisher
Bitbucket Pipelines
Workspace* / Repo*
{workspaceUuid} / {RepositoryUuid}
Deployment UUID (Optional)
{deploymentEnvironmentUuid}
Authorising the trusted publisher
The OIDC token will have the following attributes inside that can be used to verify the publisher is the same as the configured trusted publisher
workspaceUuidrepositoryUuiddeploymentEnvironmentUuid
Example of claims
{
"sub": "{60518816-1111-1111-1111-555555c267ed}:{2df4c531-1111-1111-1111-5555556048f8c}:{stepUuid}",
"aud": "ari:cloud:bitbucket::workspace/3a8a18b2-1111-1111-1111-55555519a6f30",
"stepUuid": "{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx}",
"deploymentEnvironmentUuid": "{2df4c531-1111-1111-1111-5555556048f8c}",
"iss": "https://api.bitbucket.org/2.0/workspaces/bitbucket-workspace/pipelines-config/identity/oidc",
"repositoryUuid": "{60518816-1111-1111-1111-555555c267ed}",
"branchName": "xxxxxxxxx",
"exp": "xxxxxxxxxx",
"iat": "xxxxxxxxxx",
"pipelineUuid": "{xxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxx}",
"workspaceUuid": "{3a8a18b2-1111-1111-1111-55555519a6f30}"
}
Authenticating the OIDC Token
The pipeline will send a JWT containing claims containing information that is needed to authorise the pipeline to publish to NPM.
The JWT can then be authenticated using RSA keys found via:
jwks_urilink found in https://api.bitbucket.org/2.0/workspaces/{bitbucket-workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration- Or through https://api.bitbucket.org/2.0/workspaces/{bitbucket-workspace}/pipelines-config/identity/oidc/keys.json url directly
Activity
thambikidu commentedon Jul 14, 2026
Is there a timeline on when this will be done for BB users ?
slootjes commentedon Aug 7, 2026
What's the hold up on this? It's open for a very long time without any feedback.
LordSnooz commentedon Aug 18, 2026
Following up on this now that npm has announced a concrete deadline.
As of January 2027, bypass-2FA granular access tokens will lose the ability to publish directly, and npm is explicitly recommending that automated publishing move to Trusted Publishing (OIDC) or staged publishing:
https://github.blog/changelog/2026-07-31-restricting-npm-bypass-2fa-granular-access-tokens/
For Bitbucket Pipelines users, Trusted Publishing is still not available, leaving us without an equivalent migration path to GitHub Actions or GitLab CI/CD.
Is support for Bitbucket Pipelines planned before the January 2027 cutoff?
I'm concerned that without a clear path or timeline, teams relying on Bitbucket Pipelines will only start discovering that their publishing workflows are blocked once the restriction takes effect.
There is also significant interest on the Bitbucket side:
https://jira.atlassian.com/browse/BCLOUD-23917
It would be really helpful to know whether this integration is being considered, and if so, whether there is a target timeline.
TestDVCS commentedon Aug 25, 2026
Is there a timeline on when this will be done for BB users ?
LAKnoKAL commentedon Sep 8, 2026
Any updates?
securepii-dev commentedon Nov 7, 2026
Any comment? Only 2 months left before we cant publish automatically via Bitbucket CI
jarethrossking commentedon Nov 16, 2026
Can we please get an update on this item