Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
affidavit π
The Provenance Layer for High-Assurance Systems.
affidavit is a cryptographic provenance engine designed to make the unverifiable unconstructable. It assembles, seals, and certifies provenance receiptsβappend-only, content-addressed BLAKE3 chains of operation-events that provide an immutable record of what a process actually did.
ποΈ Doctrine: Certify, Don't Decide
In complex systems, "honesty" is often undecidable. affidavit shifts the burden from detection to certification:
- Witness-Based Verification: The verifier doesn't hunt for fraud; it checks a witness (the receipt) against a formal format standard.
- Decidable Pipeline: Every stage of the 7-stage certify pipeline is decidable, yielding a definitive
ACCEPTorREJECTverdict. - Unconstructable Bypass: Valid receipts cannot be "faked" or manually constructed. They must pass through canonical, sealed seams in the library.
- Content-Addressed Integrity: Every event is linked via a rolling BLAKE3 hash. A single bit flip in any historical event invalidates the entire chain.
π The 1000x Initiative
affidavit has been supercharged with 30+ features focused on Combinatorial Maximalism and world-class DX:
- β‘ High-Performance: Parallelized verification across multi-core architectures.
- π Deep Introspection: Auto-generate DFG/Petri models from receipts.
- π‘οΈ Chaos Engineering: Built-in mutation testing to stress-test your verifiers.
- π€ Intelligent CLI: 65+ canonical verbs, ontology-driven help, and powerful ad-hoc querying.
π οΈ Installation & Quick Start
Build from Source
Ensure you have the latest stable Rust toolchain installed.
The "Golden Run" in 30 Seconds
Run the end-to-end smoke test to see affidavit in action:
π Core Concepts
The Provenance Receipt
A receipt is the primary unit of evidence. It consists of:
- Events: Discrete operation records with monotonic sequence numbers.
- Commitments: BLAKE3 digests of payload data (payloads are never stored in the receipt).
- Chain Seal: A rolling hash that binds the entire history together.
The 7-Stage Certify Pipeline
Each receipt passes through a rigorous validation gauntlet:
- Decode: Structural presence and version parsing.
- Format Check: Verification against the
core/v1standard. - Chain Integrity: Cryptographic re-computation of the rolling hash.
- Continuity: Logical sequence and uniqueness validation.
- Commitment Verify: Structural validation of all payload digests.
- Profile Evaluation: Conformance scoring against business logic.
- Final Verdict: Atomic
ACCEPTorREJECToutput.
π» CLI Surface
Affidavit v26.6.22 expanded the CLI ontology to encompass 59 canonical verbs, generating a massive CLI surface capable of advanced provenance, auditing, and analysis workflows.
Core Verbs (The Provenance Loop):
affi emitβ Record a new operation-event.affi assembleβ Finalize and seal the current receipt.affi verifyβ Run the certify pipeline against a receipt.affi showβ Inspect receipt details.
Western Electric Quality (Real-Time Monitoring):
affi quality monitorβ Start Western Electric live statistical process control monitoring.affi quality portfolioβ Analyze portfolio health across repositories.affi quality trend-analysisβ Display historical degradation metrics.
SBOM & Supply Chain Provenance:
affi sbom scanβ Generate SBOM representation (SPDX/CycloneDX).affi sbom attestβ Sign and bind an SBOM to the cryptographic provenance chain.affi sbom blast-radiusβ Calculate vulnerability risk propagation in the dependency graph.affi sbom complianceβ Run NTIA minimum-element compliance verification.
Advanced Auditing:
affi receipt modelβ Generate architectural models from provenance.affi causality-chainβ Track root cause and event lineage.affi security-debtβ Calculate pending remediation metrics.
For the complete list of all 65+ verbs, run affi --help or explore the command reference.
π‘οΈ Security Model
affidavit is designed for high-stakes environments where provenance is non-negotiable:
- Zero-Knowledge Payloads: We store commitments, not raw data, protecting sensitive information.
- Deterministic Hashing: Canonical JSON serialization ensures hashes are stable across platforms.
- Memory Safety: Written in 100%
safeRust (enforced via#![deny(unsafe_code)]).
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines on how to participate in the provenance revolution.
π License
Dual-licensed under MIT or Apache 2.0.