Skip to main content

Module model

Module model 

Source
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§

Annotation
Annotation/comment
CanonicalId
Canonical identifier for a component.
CanonicalIdResult
Result of canonical ID generation, including stability information
Component
Component in the normalized SBOM
ComponentExtensions
Component-level extensions
ComponentIdentifiers
Component identifiers from various sources
ComponentRef
A lightweight reference to a component, combining its stable ID with a human-readable display name.
ComponentSortKey
Pre-computed lowercase strings for sorting without repeated allocations.
Contact
Contact information
CraSidecarMetadata
CRA sidecar metadata that supplements SBOM information
Creator
Creator information
CvssScore
CVSS score information
DependencyEdge
Dependency edge between components
DocumentMetadata
Document-level metadata
EolInfo
End-of-life information for a component
ExternalReference
External reference
FormatExtensions
Format-specific extensions that don’t map to the canonical model
Hash
Cryptographic hash
KevInfo
CISA Known Exploited Vulnerabilities (KEV) catalog information
LicenseEvidence
License evidence from source scanning
LicenseExpression
License expression following SPDX license expression syntax
LicenseInfo
License information for a component
NormalizedSbom
Normalized SBOM document - the canonical intermediate representation.
NormalizedSbomIndex
Precomputed index for efficient SBOM queries.
Organization
Organization/supplier information
Property
Key-value property
Remediation
Remediation information
SbomIndexBuilder
Builder for creating indexes with optional features.
SignatureInfo
Digital signature information for the SBOM document
StalenessInfo
Staleness information for a component
VexStatus
VEX (Vulnerability Exploitability eXchange) status
VulnerabilityCounts
Vulnerability counts by severity
VulnerabilityRef
Reference to a vulnerability affecting a component
VulnerabilityRef2
A reference to a vulnerability with its associated component

Enums§

CompletenessDeclaration
Self-declared completeness level of the SBOM
ComponentType
Component type classification
CraSidecarError
Errors that can occur when loading sidecar metadata
CreatorType
Type of creator
CvssVersion
CVSS version
DependencyScope
Dependency scope
DependencyType
Dependency relationship type
Ecosystem
Ecosystem/package manager type
EolStatus
End-of-life status classification for components
ExternalRefType
External reference types
HashAlgorithm
Hash algorithm types
IdReliability
Reliability level of component identification
IdSource
Source of the canonical identifier, ordered by reliability
LicenseFamily
License family classification
RemediationType
Remediation type
SbomFormat
SBOM format type
Severity
Severity level
StalenessLevel
Staleness level classification for dependencies
VexJustification
VEX justification for not_affected status
VexResponse
VEX response type
VexState
VEX state
VulnerabilitySource
Vulnerability database source