sigstore / sigstore-conformance

Conformance testing for Sigstore clients
https://sigstore.dev
7 stars 10 forks source link

Tests for handling of malleable fields #151

Open woodruffw opened 3 weeks ago

woodruffw commented 3 weeks ago

@segiddins has pointed out that some Rekor log entry/bundle fields have malleable formats, e.g. anything that uses Base64 (or PEM). We should probably have some tests that confirm that clients perform comparisons on the underlying contents, not the malleable containers themselves.

haydentherapper commented 3 weeks ago

I have a doc about this topic I can share. Ideally we solve this in Rekor by canonicalizing to a specific format, but it’s a hard problem just due to how many transformations are possible.

From a client perspective, they should verify using the canonicalized structure returned by the log.

From a monitor perspective, the risk is low, just that someone could reupload a malleable entry.

woodruffw commented 3 weeks ago

Thanks @haydentherapper! Yeah, I agree the risk is low here -- I think having these will help prevent more false negatives in clients (e.g. around slightly different PEM serializations) than anything else 🙂