fix: oidc visibility check for provenance by reggi · Pull Request #8467 · npm/cli · GitHub
Skip to content

fix: oidc visibility check for provenance - #8467

Merged
reggi merged 5 commits into
latestfrom
reggi/oidc-private-prov
Jul 30, 2025
Merged

reggi merged 5 commits into
latestfrom
reggi/oidc-private-prov

Conversation

@reggi

@reggi reggi commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

When someone with a public repository and a private package attempts to publish with OIDC, the publish command will fail because provenance is enabled, there is currently no visibility check before auto enabling provenance.

This is a very rare edge case, but it's still incorrect. OIDC will always gracefully fail, but provenance does not.

  • This fix adds all the provenance related code after the OIDC auth token is set.
  • This requires provenance to be in the default config state (not set by the user) for OIDC to even consider auto-enabling provannece.

@reggi
reggi requested a review from a team as a code owner July 29, 2025 15:36
Comment thread lib/utils/oidc.js Outdated
Comment thread lib/utils/oidc.js Outdated
reggi and others added 2 commits July 29, 2025 16:56
Co-authored-by: Gar <gar+gh@danger.computer>
Co-authored-by: Gar <gar+gh@danger.computer>
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