trailofbits / pypi-attestations

A library to convert between Sigstore Bundles and PEP 740 Attestation objects
https://trailofbits.github.io/pypi-attestations
Apache License 2.0
1 stars 1 forks source link

Add `AttestationType`, check during verify #29

Closed woodruffw closed 3 months ago

woodruffw commented 3 months ago

This ratchets verification down slightly: we reject the payload even if signed if it doesn't match one of our known attestation types, rather than expecting the caller to check the attestation type.

The caller can still further filter verification, e.g. by rejecting attestation types known to pypi-attestations but not supported by the caller.

WIP; needs tests.