sigstore-verify
Sigstore signature verification for sigstore-rust.
Overview
This crate provides high-level APIs for verifying Sigstore signatures. It handles the complete verification flow: bundle parsing, certificate chain validation, signature verification, transparency log verification, and identity policy enforcement.
Features
- Bundle verification: Verify standard Sigstore bundles
- Certificate validation: X.509 chain validation against Fulcio CA
- Transparency log verification: Checkpoint signatures, inclusion proofs, SETs
- Timestamp verification: RFC 3161 timestamp validation
- Identity policies: Verify signer identity claims (issuer, subject, etc.)
Verification Steps
- Parse and validate bundle structure
- Verify certificate chain against trusted root
- Verify signature over artifact
- Verify transparency log entry (checkpoint, inclusion proof, or SET)
- Verify timestamps if present
- Check identity against policy (optional)
Usage
use ;
use ;
use ;
let bundle: Bundle = from_str?;
let policy = default;
// Actively choose the Sigstore instance and fetch its root through TUF.
let root = from_tuf.await?;
// Verify with raw artifact bytes
let artifact_bytes = b"hello world";
let result = verify?;
// Or verify with pre-computed SHA-256 digest (useful for large files)
let digest = from_hex?;
let result = verify?;
// Using the Verifier struct directly
let verifier = new;
let result = verifier.verify?;
For GitHub artifact attestations, choose GitHub's Sigstore instance explicitly and use the GitHub verification profile:
use ;
use ;
use ;
let bundle: Bundle = from_str?;
let artifact_digest = from_hex?;
// Fetch GitHub's trusted root over TUF (now supported via the `sigstore-tuf`
// client), or use the embedded copy below for an offline path.
// let root = TrustedRoot::from_tuf(sigstore_trust_root::TufConfig::github()).await?;
let root = from_embedded?;
let policy = default.skip_tlog.skip_sct;
let result = verify?;
Verification Policies
use VerificationPolicy;
// Default policy (verify tlog, timestamps, and certificate chain)
let policy = default;
// Require specific identity and issuer
let policy = default
.require_identity
.require_issuer;
// Skip certain verifications (for testing only)
let policy = default
.skip_tlog
.skip_certificate_chain;
Related Crates
sigstore-sign- Create signatures to verify with this crate
License
BSD-3-Clause