Expand description
Intermediate representation for normalized SBOMs.
This module defines the canonical data structures used for format-agnostic
SBOM comparison. Both CycloneDX and SPDX formats are normalized to these
structures before diff operations.
§Index Support
For efficient TUI operations on large SBOMs, use NormalizedSbomIndex
to precompute lookups:
ⓘ
let sbom = parse_sbom(&path)?;
let index = NormalizedSbomIndex::build(&sbom);
// O(1) dependency lookup instead of O(edges)
let deps = index.dependencies_of(&component_id, &sbom.edges);Structs§
- Affirmation
Signatory - A
declarations.affirmation.signatories[]entry. - Algorithm
Classification - Structured result of
classify_algorithm: canonical family name, extracted parameter/size, and coarse security class. - Algorithm
Properties - Properties of a cryptographic algorithm asset.
- Annotation
- Annotation/comment
- Attestation
Assertion - A
declarations.attestations[]entry: an assessor’s mapping of standard requirements to claims. - Attestation
Declarations - Normalized CDXA evidence: CycloneDX 1.6
declarationsplus thedefinitions.standardsencodings its attestations map into. - Attestation
MapEntry - One
attestations[].map[]entry: requirement → claims, with the attestor’s declared conformance and confidence. - Canonical
Id - Canonical identifier for a component.
- Canonical
IdResult - Result of canonical ID generation, including stability information
- CdxaRef
- A CDXA refLink with its parse-time resolution.
- Certificate
Properties - Properties of a digital certificate asset.
- Cipher
Suite - A cipher suite within a protocol.
- Component
- Component in the normalized SBOM
- Component
Extensions - Component-level extensions
- Component
Identifiers - Component identifiers from various sources
- Component
Ref - A lightweight reference to a component, combining its stable ID with a human-readable display name.
- Component
Sort Key - Pre-computed lowercase strings for sorting without repeated allocations.
- Contact
- Contact information
- Control
Assertion - A manufacturer-supplied assertion that a specific Annex I Part I control
is satisfied. Surfaced verbatim in the cra-docs technical-documentation
dossier and cross-checked by
ComplianceChecker(a control claimedsatisfied = truewithout anevidence_urlis flagged as a Warning). - CraSidecar
Metadata - CRA sidecar metadata that supplements SBOM information
- Creator
- Creator information
- Crypto
Properties - Cryptographic properties for a component of type
cryptographic-asset. - Cvss
Score - CVSS score information
- Dataset
Info - Dataset component metadata (CycloneDX 1.5+ data type)
- Dataset
Ref - Reference to a dataset used for training or evaluation
- Declaration
Target - One entry of
declarations.targets(organization, component, or service listed as a claim target). These are NOT part of the BOM inventory; only their identity is retained so claim targets can resolve to them. - Declaration
Targets - The
declarations.targetsobject. - Declared
Affirmation - The
declarations.affirmationobject. - Declared
Assessor - A
declarations.assessors[]entry. - Declared
Claim - A
declarations.claims[]entry: a statement about a target. - Declared
Evidence - A
declarations.evidence[]entry. - Defined
Requirement - One
definitions.standards[].requirements[]entry. - Defined
Standard - One
definitions.standards[]entry: a machine-readable standard encoding. (levelsare not normalized in phase 1.) - Dependency
Edge - Dependency edge between components
- Document
Metadata - Document-level metadata
- EolInfo
- End-of-life information for a component
- Ethical
Consideration - An ethical consideration for an ML model. Normalized from CycloneDX structured
objects (
{ name, mitigationStrategy }) and SPDX free-text strings alike. - Evidence
Data Item - One
evidence[].data[]entry: output or analysis that supports claims. - External
Reference - External reference
- Fairness
Assessment - A fairness assessment for an ML model (CycloneDX 1.5+
considerations.fairnessAssessments[]). - Format
Extensions - Format-specific extensions that don’t map to the canonical model
- Hash
- Cryptographic hash.
- Ikev2
Transform Types - IKEv2 transform types for IPsec protocols (RFC 9370).
- KevInfo
- CISA Known Exploited Vulnerabilities (KEV) catalog information
- License
Evidence - License evidence from source scanning
- License
Expression - License expression following SPDX license expression syntax
- License
Info - License information for a component
- Metric
Entry - A single quantitative performance metric (CycloneDX
quantitativeAnalysis.performanceMetrics[]). - MlModel
Info - Machine learning model metadata (CycloneDX 1.5+)
- Normalized
Sbom - Normalized SBOM document - the canonical intermediate representation.
- Normalized
Sbom Index - Precomputed index for efficient SBOM queries.
- Organization
- Organization/supplier information
- Property
- Key-value property
- Protocol
Properties - Properties of a cryptographic protocol asset.
- Related
Crypto Material Properties - Properties of a cryptographic key or related material asset.
- Remediation
- Remediation information
- Sbom
Index Builder - Builder for creating indexes with optional features.
- Secured
By - How a cryptographic material is secured/protected.
- Signature
Info - Digital signature information for the SBOM document
- Signature
Presence - Structural record that a JSF (JSON Signature Format) signature object was present, and what it names.
- Staleness
Info - Staleness information for a component
- Supported
Requirement - A standard requirement that resolved CDXA evidence fully supports at the
evaluation instant (see
AttestationDeclarations::supported_requirementsfor the fail-closed criteria). Borrows from the declarations it was computed over; a query result, not a serialized artifact. - Swhid
Object - A structured Software Heritage persistent identifier.
- VexStatus
- VEX (Vulnerability Exploitability eXchange) status
- Vulnerability
Counts - Vulnerability counts by severity
- Vulnerability
Ref - Reference to a vulnerability affecting a component
- Vulnerability
Ref2 - A reference to a vulnerability with its associated component
Enums§
- Algorithm
Class - Coarse security class produced by
classify_algorithm. - Attestation
Rule Family - Engine rule families that CDXA evidence can strengthen. Requirements whose (standard, identifier) pair classifies into none of these are recorded but satisfy nothing (unknown-content handling: fail-open for recognition, fail-closed for satisfaction).
- BomProfile
- BOM profile — determines mode-specific behavior across TUI and CLI.
- Cdxa
Resolution - Where a CDXA refLink resolved at parse time.
- Certification
Level - Certification or validation level achieved.
- Completeness
Declaration - Self-declared completeness level of the SBOM
- Component
Type - Component type classification
- Conformity
Route - Conformity-assessment module per CRA Annex VIII.
- CraProduct
Class - CRA product class per Regulation (EU) 2024/2847 Annex III/IV.
- CraSidecar
Error - Errors that can occur when loading sidecar metadata
- Creator
Type - Type of creator
- Crypto
Asset Type - Type of cryptographic asset.
- Crypto
Function - Cryptographic function capability.
- Crypto
Material State - Lifecycle state of cryptographic material.
- Crypto
Material Type - Type of cryptographic key material.
- Crypto
Mode - Block cipher mode of operation.
- Crypto
Padding - Padding scheme.
- Crypto
Primitive - Cryptographic primitive type.
- Cvss
Version - CVSS version
- Dependency
Scope - Dependency scope
- Dependency
Type - Dependency relationship type
- Ecosystem
- Ecosystem/package manager type
- EolStatus
- End-of-life status classification for components
- Evidence
Level - How strongly a piece of compliance evidence is attested.
- Execution
Environment - Execution environment for the cryptographic implementation.
- External
RefType - External reference types
- Hash
Algorithm - Hash algorithm types
- Hash
Provenance - Where a hash came from — determines whether integrity verification trusts
it as an EXPECTED baseline. Runtime-only, never serialized: a hash parsed
from an SBOM is author-attested (
Authored); one this tool added during enrichment (fetched from a registry / served from cache) isEnrichedand must NOT be used as the baseline to verify local files against — that would be circular (the tool checks a file against a hash it fetched from the same source that could host the file). - IdReliability
- Reliability level of component identification
- IdSource
- Source of the canonical identifier, ordered by reliability
- Implementation
Platform - Hardware/software platform of the implementation.
- License
Family - License family classification
- PqcKind
- NIST-standardized (or SP 800-208) post-quantum algorithm kind.
- Protocol
Type - Cryptographic protocol type.
- Remediation
Type - Remediation type
- Sbom
Format - SBOM format type
- Severity
- Severity level
- Staleness
Level - Staleness level classification for dependencies
- Swhid
Kind - Software Heritage persistent identifier kind.
- Swhid
Parse Error - Errors returned when parsing a SWHID string.
- VexJustification
- VEX justification for
not_affectedstatus - VexResponse
- VEX response type
- VexState
- VEX state
- Vulnerability
Source - Vulnerability database source
Functions§
- classify_
algorithm - Classify a cryptographic algorithm from whatever identity a CBOM provides.
- classify_
algorithm_ names - Extract every recognizable algorithm mention from a free-form name using
word-boundary token matching (never bare substrings). Used for cipher-suite
names (“
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256”) and as the guarded name-based fallback for assets withoutalgorithmFamily/OID. - classify_
algorithm_ names_ guarded - Like
classify_algorithm_names, but drops the riskiest bare aliases (“SEED”, “EC”/“ECC”) that collide with everyday words — “seed-expander” is a DRBG utility, not the SEED block cipher, and “ec2” is not elliptic curve crypto. Used for the name-only fallback and raw bom-ref scans, where no structured identity backs the token; declaredalgorithmFamilystrings and cipher-suite names (where bare “SEED” really is the cipher) keep the full alias table. - is_
valid_ swhid - Validate a SWHID string (convenience predicate over
SwhidObject::parse). - worst_
classification - The most severe classification among
mentions(first wins on ties), perAlgorithmClass::severity_rank. Callers that must reduce a multi-algorithm identity (“sha384-rsa-cert-chain”) to one verdict use this so the worst algorithm is reported, never whichever token happened to appear first.