Expand description
Cosign bundle helper for model cards.
Wraps chio_attest_verify::SigstoreVerifier::verify_bundle so that
callers presenting a (card_bytes, bundle_json) pair can verify the
bundle without reaching into sigstore-rs directly. The model-card
binding does not introduce a new trust root or a new signature path;
the existing cosign bundle verifier (and the PQ-hybrid surface) is
consumed verbatim.
§Trust contract
card_bytesMUST be the RFC 8785 canonical-JSON encoding of thecrate::card::ModelCard. The cosign bundle’s signature is taken over those bytes, so re-encoding through any non-canonical serializer produces a different digest and the bundle rejects fail-closed.expectedis anExpectedIdentitysupplied by the caller. The helper does not synthesise a default identity; deployments that flippolicy.weights_card_required = required_with_pinprovide the SAN regex from the provider matrix.nowis the verifier-side current time used to enforce the card’sexpires_at. The cosign verifier’s certificate-window check is independent of this and runs against the cert’snotBefore/notAfter.
§Trust boundary
Every public method that returns Ok(_) MUST mean:
- the cosign bundle verified against the supplied card bytes,
- the bundle’s certificate identity matched
ExpectedIdentityand its OIDC issuer matchedExpectedIdentity::certificate_oidc_issuer, - the card decoded cleanly from the canonical bytes, and
- the card’s
expires_atis strictly afternow.
Any failing precondition surfaces as a crate::error::WeightsError.
Structs§
- Verified
Model Card - Successful verification result. Pairs the parsed
ModelCardwith the upstreamVerifiedAttestationso receipt consumers can correlate the Rekor log index, the Fulcio identity, and the model card’s logical fields without re-parsing the bundle.
Functions§
- verify_
model_ card_ bundle - Verify a cosign-signed model card. Delegates the cryptographic verify
path to
AttestVerifier::verify_bundle; this helper does not fork it.