pub struct ScanResult {
pub vulnerabilities: Vec<Vulnerability>,
pub by_severity: HashMap<String, usize>,
pub by_language: HashMap<String, usize>,
pub duration_ms: u64,
pub languages_scanned: Vec<String>,
pub scanner_status: HashMap<String, bool>,
pub errors: Vec<String>,
pub total_packages: usize,
pub vulnerable_packages: usize,
}Expand description
Aggregated scan result
Fields§
§vulnerabilities: Vec<Vulnerability>All detected vulnerabilities
by_severity: HashMap<String, usize>Vulnerabilities by severity
by_language: HashMap<String, usize>Vulnerabilities by language
duration_ms: u64Scan duration
languages_scanned: Vec<String>Languages that were scanned
scanner_status: HashMap<String, bool>Scanner availability info
errors: Vec<String>Any errors that occurred
total_packages: usizeTotal packages analyzed
vulnerable_packages: usizePackages with vulnerabilities
Implementations§
Source§impl ScanResult
impl ScanResult
Sourcepub fn filter_by_severity(&self, threshold: Severity) -> Vec<&Vulnerability>
pub fn filter_by_severity(&self, threshold: Severity) -> Vec<&Vulnerability>
Filter vulnerabilities by severity threshold
Sourcepub fn critical_high_count(&self) -> usize
pub fn critical_high_count(&self) -> usize
Get count of critical/high vulnerabilities
Sourcepub fn has_vulnerabilities_above(&self, threshold: Severity) -> bool
pub fn has_vulnerabilities_above(&self, threshold: Severity) -> bool
Check if scan found any vulnerabilities meeting threshold
Trait Implementations§
Source§impl Clone for ScanResult
impl Clone for ScanResult
Source§fn clone(&self) -> ScanResult
fn clone(&self) -> ScanResult
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 ScanResult
impl Debug for ScanResult
Source§impl Default for ScanResult
impl Default for ScanResult
Source§impl<'de> Deserialize<'de> for ScanResult
impl<'de> Deserialize<'de> for ScanResult
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 ScanResult
impl RefUnwindSafe for ScanResult
impl Send for ScanResult
impl Sync for ScanResult
impl Unpin for ScanResult
impl UnsafeUnpin for ScanResult
impl UnwindSafe for ScanResult
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