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

API improvements #63

Open woodruffw opened 2 hours ago

woodruffw commented 2 hours ago

There are a number of things we can do here to make these APIs more ergonomic:

  1. Remove all API-level foreign type dependencies: Attestation.verify should construct the sigstore types it needs internally, rather than having those foreign types passed in. #62
  2. Make Attestation.verify() take a Publisher instead of a VerificationPolicy, since the former can be transformed into the latter.
  3. Add some kind of Provenance.verify() API -- this needs a little more design thought.