pub struct AttestationDeclarations {
pub assessors: Vec<DeclaredAssessor>,
pub attestations: Vec<AttestationAssertion>,
pub claims: Vec<DeclaredClaim>,
pub evidence: Vec<DeclaredEvidence>,
pub targets: Option<DeclarationTargets>,
pub affirmation: Option<DeclaredAffirmation>,
pub signature: Option<SignaturePresence>,
pub standards: Vec<DefinedStandard>,
}Expand description
Normalized CDXA evidence: CycloneDX 1.6 declarations plus the
definitions.standards encodings its attestations map into.
Attached at crate::model::FormatExtensions::declarations (reachable
via crate::model::NormalizedSbom::declarations). Populated only by the
CycloneDX JSON parser for specVersion >= 1.6 documents that carry these
sections; None for SPDX, older CycloneDX, and XML input — and skipped in
serialization when absent, so documents without declarations serialize
byte-identically to previous releases.
Fields§
§assessors: Vec<DeclaredAssessor>§attestations: Vec<AttestationAssertion>§claims: Vec<DeclaredClaim>§evidence: Vec<DeclaredEvidence>§targets: Option<DeclarationTargets>§affirmation: Option<DeclaredAffirmation>§signature: Option<SignaturePresence>Document-level JSF signature presence over the declarations (structural only, never verified).
standards: Vec<DefinedStandard>definitions.standards[] — the standard encodings attestation map
entries refLink their requirements into.
Implementations§
Source§impl AttestationDeclarations
impl AttestationDeclarations
Sourcepub fn claim_by_ref(&self, bom_ref: &str) -> Option<&DeclaredClaim>
pub fn claim_by_ref(&self, bom_ref: &str) -> Option<&DeclaredClaim>
Look up a claim by its bom-ref.
Sourcepub fn evidence_by_ref(&self, bom_ref: &str) -> Option<&DeclaredEvidence>
pub fn evidence_by_ref(&self, bom_ref: &str) -> Option<&DeclaredEvidence>
Look up an evidence item by its bom-ref.
Sourcepub fn assessor_by_ref(&self, bom_ref: &str) -> Option<&DeclaredAssessor>
pub fn assessor_by_ref(&self, bom_ref: &str) -> Option<&DeclaredAssessor>
Look up an assessor by its bom-ref.
Sourcepub fn requirement_by_ref(
&self,
bom_ref: &str,
) -> Option<(&DefinedStandard, &DefinedRequirement)>
pub fn requirement_by_ref( &self, bom_ref: &str, ) -> Option<(&DefinedStandard, &DefinedRequirement)>
Resolve a requirement refLink to its (standard, requirement) pair.
Sourcepub fn document_evidence_level(&self) -> EvidenceLevel
pub fn document_evidence_level(&self) -> EvidenceLevel
The document-wide evidence ceiling: EvidenceLevel::SignaturePresent
when the declarations themselves, the affirmation, or any signatory
carries a JSF signature object; EvidenceLevel::Structural
otherwise. Never SignatureVerified — phase 1 records signature
presence only.
Sourcepub fn supported_requirements(
&self,
as_of: DateTime<Utc>,
) -> Vec<SupportedRequirement<'_>>
pub fn supported_requirements( &self, as_of: DateTime<Utc>, ) -> Vec<SupportedRequirement<'_>>
The standard requirements this document’s attestations fully support
at the evaluation instant as_of (pass the compliance engine’s
injectable clock — ComplianceChecker::now() — never an inline
wall-clock read).
Fail-closed criteria — an attestation map entry supports its requirement only when ALL hold:
- its
requirementrefLink resolves to adefinitions.standards[].requirements[]entry; - its declared conformance score is full (
>= 1.0; the schema caps at 1). Partial conformance is surfaced elsewhere, never auto-satisfied; - it carries no
counterClaims; - at least one
claimsrefLink resolves to a claim whose target resolves, that carries nocounterEvidence, and that cites at least one resolving evidence item fresh atas_of(DeclaredEvidence::is_fresh).
Dangling refs anywhere in the chain simply drop that path — the
parser’s tolerance convention keeps them in the model (marked
CdxaResolution::Dangling) for rules that surface them.
Sourcepub fn evidence_for_family(
&self,
family: AttestationRuleFamily,
as_of: DateTime<Utc>,
) -> Vec<SupportedRequirement<'_>>
pub fn evidence_for_family( &self, family: AttestationRuleFamily, as_of: DateTime<Utc>, ) -> Vec<SupportedRequirement<'_>>
Self::supported_requirements filtered to the requirements whose
(standard, identifier) pair classifies into family
(AttestationRuleFamily::classify). Unknown pairs never appear —
they are recorded in the model but cannot influence a verdict.
Trait Implementations§
Source§impl Clone for AttestationDeclarations
impl Clone for AttestationDeclarations
Source§fn clone(&self) -> AttestationDeclarations
fn clone(&self) -> AttestationDeclarations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttestationDeclarations
impl Debug for AttestationDeclarations
Source§impl Default for AttestationDeclarations
impl Default for AttestationDeclarations
Source§fn default() -> AttestationDeclarations
fn default() -> AttestationDeclarations
Source§impl<'de> Deserialize<'de> for AttestationDeclarations
impl<'de> Deserialize<'de> for AttestationDeclarations
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AttestationDeclarations
impl PartialEq for AttestationDeclarations
Source§impl Serialize for AttestationDeclarations
impl Serialize for AttestationDeclarations
impl StructuralPartialEq for AttestationDeclarations
Auto Trait Implementations§
impl Freeze for AttestationDeclarations
impl RefUnwindSafe for AttestationDeclarations
impl Send for AttestationDeclarations
impl Sync for AttestationDeclarations
impl Unpin for AttestationDeclarations
impl UnsafeUnpin for AttestationDeclarations
impl UnwindSafe for AttestationDeclarations
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more