Skip to content

fix: npm audit signatures for keyless attestation registries#9026

Merged
wraithgar merged 1 commit intonpm:latestfrom
ajayk:verify-signatures
Feb 24, 2026
Merged

fix: npm audit signatures for keyless attestation registries#9026
wraithgar merged 1 commit intonpm:latestfrom
ajayk:verify-signatures

Conversation

@ajayk
Copy link
Contributor

@ajayk ajayk commented Feb 24, 2026

npm audit signatures fails when a registry only uses keyless (Sigstore/Fulcio) attestations and doesn't provide registry signing keys. The auditedWithKeysCount guard in verify-signatures.js treats any registry without keys as unsupported, even though keyless attestations don't need registry keys at all -- the signing certificate is embedded directly in the bundle and verified through Sigstore's TUF root of trust.

This updates the check to also accept verified keyless attestations as a valid audit result, so registries that exclusively use Fulcio-based signing (like Chainguard) work correctly with npm audit signatures.

Before this change:
npm error found no dependencies to audit that were installed from a supported registry

After:
audited 1 package in 1s

1 package has a verified attestation

This change works together with the corresponding pacote fixes (pacote/pull/454)
(pacote/pull/452)
which allows keyless attestation bundles to pass the registry key matching check.

@ajayk ajayk requested a review from a team as a code owner February 24, 2026 20:04
@wraithgar
Copy link
Member

We tend not to accept PRs that update dependencies. We have a dependency updates PR in flight now #9027

@ajayk ajayk force-pushed the verify-signatures branch from 9196c52 to cb460e2 Compare February 24, 2026 22:54
@ajayk
Copy link
Contributor Author

ajayk commented Feb 24, 2026

We tend not to accept PRs that update dependencies. We have a dependency updates PR in flight now #9027

Thanks I will rebase it once it merges

@ajayk ajayk force-pushed the verify-signatures branch 2 times, most recently from 5ac20bf to 0fa2cc8 Compare February 24, 2026 23:11
@ajayk
Copy link
Contributor Author

ajayk commented Feb 24, 2026

@wraithgar rebased and for your review

@wraithgar wraithgar merged commit 4426411 into npm:latest Feb 24, 2026
20 checks passed
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
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