pub struct VulnerabilityDetail {Show 19 fields
pub id: String,
pub source: String,
pub severity: String,
pub cvss_score: Option<f32>,
pub component_id: String,
pub component_canonical_id: Option<CanonicalId>,
pub component_ref: Option<ComponentRef>,
pub component_name: String,
pub version: Option<String>,
pub cwes: Vec<String>,
pub description: Option<String>,
pub remediation: Option<String>,
pub is_kev: bool,
pub component_depth: Option<u32>,
pub published_date: Option<String>,
pub kev_due_date: Option<String>,
pub days_since_published: Option<i64>,
pub days_until_due: Option<i64>,
pub vex_state: Option<VexState>,
}Expand description
Detailed vulnerability information
Fields§
§id: StringVulnerability ID
source: StringSource database
severity: StringSeverity level
cvss_score: Option<f32>CVSS score
component_id: StringAffected component ID (string for serialization)
component_canonical_id: Option<CanonicalId>Typed canonical ID for the component (skipped in JSON for backward compat)
component_ref: Option<ComponentRef>Component reference with ID and name together
component_name: StringAffected component name
version: Option<String>Affected version
cwes: Vec<String>CWE identifiers
description: Option<String>Description
remediation: Option<String>Remediation info
is_kev: boolWhether this vulnerability is in CISA’s Known Exploited Vulnerabilities catalog
component_depth: Option<u32>Dependency depth (1 = direct, 2+ = transitive, None = unknown)
published_date: Option<String>Date vulnerability was published (ISO 8601)
kev_due_date: Option<String>KEV due date (CISA mandated remediation deadline)
days_since_published: Option<i64>Days since published (positive = past)
days_until_due: Option<i64>Days until KEV due date (negative = overdue)
vex_state: Option<VexState>VEX state for this vulnerability’s component (if available)
Implementations§
Source§impl VulnerabilityDetail
impl VulnerabilityDetail
Sourcepub fn is_vex_actionable(&self) -> bool
pub fn is_vex_actionable(&self) -> bool
Whether this vulnerability is VEX-actionable (not resolved by vendor analysis).
Returns true if the VEX state is Affected, UnderInvestigation, or absent.
Returns false if the VEX state is NotAffected or Fixed.
Sourcepub fn from_ref(vuln: &VulnerabilityRef, component: &Component) -> Self
pub fn from_ref(vuln: &VulnerabilityRef, component: &Component) -> Self
Create from a vulnerability reference and component
Sourcepub fn from_ref_with_depth(
vuln: &VulnerabilityRef,
component: &Component,
depth: Option<u32>,
) -> Self
pub fn from_ref_with_depth( vuln: &VulnerabilityRef, component: &Component, depth: Option<u32>, ) -> Self
Create from a vulnerability reference and component with known depth
Sourcepub fn sla_status(&self) -> SlaStatus
pub fn sla_status(&self) -> SlaStatus
Calculate SLA status based on KEV due date or severity-based policy
Priority order:
- KEV due date (CISA mandated deadline)
- Severity-based SLA (Critical=1d, High=7d, Medium=30d, Low=90d)
Sourcepub fn get_component_id(&self) -> CanonicalId
pub fn get_component_id(&self) -> CanonicalId
Get the typed component canonical ID
Sourcepub fn get_component_ref(&self) -> ComponentRef
pub fn get_component_ref(&self) -> ComponentRef
Get a ComponentRef for the affected component
Trait Implementations§
Source§impl Clone for VulnerabilityDetail
impl Clone for VulnerabilityDetail
Source§fn clone(&self) -> VulnerabilityDetail
fn clone(&self) -> VulnerabilityDetail
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VulnerabilityDetail
impl Debug for VulnerabilityDetail
Source§impl<'de> Deserialize<'de> for VulnerabilityDetail
impl<'de> Deserialize<'de> for VulnerabilityDetail
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>,
Auto Trait Implementations§
impl Freeze for VulnerabilityDetail
impl RefUnwindSafe for VulnerabilityDetail
impl Send for VulnerabilityDetail
impl Sync for VulnerabilityDetail
impl Unpin for VulnerabilityDetail
impl UnwindSafe for VulnerabilityDetail
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,
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