Skip to content

Commit e86bce6

Browse files
Mitch DennyCopilot
andcommitted
refactor(audit): read attestation bundles from separate _attestationBundles attribute
Update verify-signatures to destructure _attestationBundles from the pacote manifest (a separate attribute from _attestations) and include it in the verified entries JSON output. This aligns with the pacote change that stores bundles on a separate _ attribute to avoid future collisions with registry schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d8dc133 commit e86bce6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/utils/verify-signatures.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ class VerifySignatures {
297297
_integrity: integrity,
298298
_signatures,
299299
_attestations,
300+
_attestationBundles,
300301
_resolved: resolved,
301302
} = await pacote.manifest(`${name}@${version}`, {
302303
verifySignatures: true,
@@ -309,6 +310,7 @@ class VerifySignatures {
309310
integrity,
310311
signatures,
311312
attestations: _attestations,
313+
attestationBundles: _attestationBundles,
312314
resolved,
313315
}
314316
return result
@@ -334,9 +336,8 @@ class VerifySignatures {
334336
}
335337

336338
try {
337-
const { integrity, signatures, attestations, resolved } = await this.verifySignatures(
338-
name, version, registry
339-
)
339+
const { integrity, signatures, attestations, attestationBundles, resolved } =
340+
await this.verifySignatures(name, version, registry)
340341

341342
// Currently we only care about missing signatures on registries that provide a public key
342343
// We could make this configurable in the future with a strict/paranoid mode
@@ -365,6 +366,7 @@ class VerifySignatures {
365366
location,
366367
registry,
367368
attestations,
369+
attestationBundles,
368370
})
369371
}
370372
}

0 commit comments

Comments
 (0)