Skip to main content

Crate cellos_evidence

Crate cellos_evidence 

Source
Expand description

Accreditation evidence library (S42/S43/S44, ADR-0032).

This crate turns the hand-authored control-mapping catalog (contracts/controls/cellos-800-53-rev5-mapping.json) into machine-checked, deterministically-emitted accreditation evidence. It does three things:

  1. Load + lint (S43). load_catalog parses the catalog and lint_catalog asserts every entry validates against the control-mapping schema, that every codeSeams/provingTests path resolves on disk, that status: implemented entries carry non-empty proving event types and tests, and that a linux-nftables + implemented entry carries a degradedBindingNote.
  2. Emit (S44). emit_oscal produces an OSCAL-style component-definition + SSP fragment (EvidencePackage) where every implemented requirement carries machine-embedded remarks that this is a candidate, not an assessor-verified satisfaction. SC-13/IA-7 carry an explicit “crypto module NOT CMVP-validated” remark; linux-nftables entries carry a platform-scope remark.

§Honesty invariants

The catalog is candidate evidence an operator hands to an assessor, not a self-attestation of satisfaction (mirrors how a cortex receipt is a candidate, never a direct admission). The emitter therefore stamps every implemented requirement with candidate, not assessor-verified and refuses to silently upgrade algorithm-present-not-validated (SC-13/IA-7) into a validated claim.

§Determinism

emit_oscal is a pure function of the catalog bytes: entries are emitted in catalog order and every map is a BTreeMap/ordered Vec, so two emit runs are byte-identical. This is asserted by the crate tests.

Re-exports§

pub use rollup::rollup;
pub use rollup::ControlCoverage;
pub use rollup::RollupReport;
pub use sign::sign_evidence_package;
pub use sign::verify_evidence_package;
pub use sign::EVIDENCE_PACKAGE_TYPE;

Modules§

rollup
Period evidence rollup (S45, ADR-0032).
sign
Signed evidence-package manifest (S47, ADR-0032).

Structs§

Component
One component (the CellOS substrate) carrying control implementations.
ComponentDefinition
OSCAL-style component-definition fragment.
ControlImplementation
One control implementation entry (component-definition side).
ControlMappingEntry
One control-mapping catalog entry. Field shape mirrors control-mapping-v1.schema.json; #[serde(rename_all = "camelCase")] keeps the on-disk JSON keys identical to the schema.
EvidencePackage
The full deterministic evidence package: a component-definition and an SSP fragment. Serialized with serde_json in catalog order.
ImplementedRequirement
One implemented-requirement (SSP side).
Metadata
Metadata block shared by both fragments.
SspFragment
OSCAL-style SSP fragment.

Enums§

EvidenceError
Errors raised while loading or linting the catalog.
SchemaError
Schema load / compile errors.

Constants§

CANDIDATE_REMARK
Machine-embedded remark stamped on every emitted implemented requirement.
CATALOG_RELPATH
Repo-relative path to the canonical control-mapping catalog (S42).
CRYPTO_NOT_VALIDATED_REMARK
Machine-embedded remark for SC-13/IA-7 (algorithm-present-not-validated).
SCHEMA_RELPATH
Repo-relative path to the control-mapping JSON Schema (S41).

Functions§

control_mapping_schema_json
Read the control-mapping schema JSON from disk under root.
emit_oscal
Deterministically emit the OSCAL-style evidence package from the catalog (S44). Pure function of entries — emits in catalog order with ordered maps, so two runs over the same catalog are byte-identical.
emit_oscal_bytes
Serialize an EvidencePackage to deterministic pretty JSON bytes.
lint_catalog
Lint the catalog (S43).
load_catalog
Load and parse the control-mapping catalog under root.
load_catalog_values
Load the raw catalog JSON values (schema-validated against the exact on-disk shape, not the deserialized struct). Used by the linter so that schema violations surface as schema errors rather than parse errors.
repo_root
Resolve the repo root from this crate’s manifest dir (<root>/crates/cellos-evidence).
validate_entry
Validate a single entry value against the control-mapping schema under root. Convenience wrapper that compiles a fresh validator.