Skip to content

fix: decouple npm provenance from OIDC trusted publishing#1050

Merged
dhayab merged 1 commit into
mainfrom
fix/decouple-provenance-from-oidc
Jun 9, 2026
Merged

fix: decouple npm provenance from OIDC trusted publishing#1050
dhayab merged 1 commit into
mainfrom
fix/decouple-provenance-from-oidc

Conversation

@dhayab

@dhayab dhayab commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

This PR decouples npm provenance generation from OIDC trusted publishing, fixing publish failures on private/internal repositories.

  • fix: enable npm OIDC trusted publishing #1042 tied --provenance to useOidcTokenProvider, but they are independent concerns. One controls authentication (token vs. OIDC trusted publishing), the other controls whether a provenance attestation is attached. npm rejects provenance for private/internal repos, so any private-repo user enabling OIDC had their release fail at the publish step.
  • Adds a dedicated generateProvenance config option (default false). useOidcTokenProvider now only controls authentication.
  • This makes the previously inexpressible "classic token auth + provenance" combination work, and lets private/internal repos use OIDC without provenance.

Note

Provenance is no longer emitted automatically when useOidcTokenProvider is enabled. It is now opt-in via generateProvenance: true. This is not a breaking change: it only means an attestation is no longer attached by default. Public-repo users who want to keep generating provenance simply set generateProvenance: true.

@dhayab dhayab requested review from Haroenv and sarahdayan June 4, 2026 12:46
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes.

@dhayab dhayab merged commit aaa9d32 into main Jun 9, 2026
7 checks passed
@dhayab dhayab deleted the fix/decouple-provenance-from-oidc branch June 9, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants