pub struct VulnerabilityGroup {
pub component_id: String,
pub component_name: String,
pub component_version: Option<String>,
pub vulnerabilities: Vec<VulnerabilityDetail>,
pub max_severity: String,
pub max_cvss: Option<f32>,
pub severity_counts: HashMap<String, usize>,
pub status: VulnGroupStatus,
pub has_kev: bool,
pub has_ransomware_kev: bool,
}Expand description
A group of vulnerabilities sharing the same root cause component
Fields§
§component_id: StringRoot cause component ID
component_name: StringComponent name
component_version: Option<String>Component version (if available)
vulnerabilities: Vec<VulnerabilityDetail>Vulnerabilities in this group
max_severity: StringMaximum severity in the group
max_cvss: Option<f32>Maximum CVSS score in the group
severity_counts: HashMap<String, usize>Count by severity level
status: VulnGroupStatusGroup status (Introduced, Resolved, Persistent)
has_kev: boolWhether any vulnerability is in KEV catalog
has_ransomware_kev: boolWhether any vulnerability is ransomware-related
Implementations§
Source§impl VulnerabilityGroup
impl VulnerabilityGroup
Sourcepub fn new(
component_id: String,
component_name: String,
status: VulnGroupStatus,
) -> Self
pub fn new( component_id: String, component_name: String, status: VulnGroupStatus, ) -> Self
Create a new empty group for a component
Sourcepub fn add_vulnerability(&mut self, vuln: VulnerabilityDetail)
pub fn add_vulnerability(&mut self, vuln: VulnerabilityDetail)
Add a vulnerability to the group
Sourcepub fn vuln_count(&self) -> usize
pub fn vuln_count(&self) -> usize
Get total vulnerability count
Sourcepub fn has_critical(&self) -> bool
pub fn has_critical(&self) -> bool
Check if group has any critical vulnerabilities
Sourcepub fn summary_line(&self) -> String
pub fn summary_line(&self) -> String
Get summary line for display
Trait Implementations§
Source§impl Clone for VulnerabilityGroup
impl Clone for VulnerabilityGroup
Source§fn clone(&self) -> VulnerabilityGroup
fn clone(&self) -> VulnerabilityGroup
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VulnerabilityGroup
impl Debug for VulnerabilityGroup
Source§impl<'de> Deserialize<'de> for VulnerabilityGroup
impl<'de> Deserialize<'de> for VulnerabilityGroup
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VulnerabilityGroup
impl RefUnwindSafe for VulnerabilityGroup
impl Send for VulnerabilityGroup
impl Sync for VulnerabilityGroup
impl Unpin for VulnerabilityGroup
impl UnsafeUnpin for VulnerabilityGroup
impl UnwindSafe for VulnerabilityGroup
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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