pub struct Enrichment {
pub kev: BTreeSet<String>,
pub epss: BTreeMap<String, f32>,
pub cvss: BTreeMap<String, f32>,
}Expand description
CVE → exploit signals, used to annotate findings.
Fields§
§kev: BTreeSet<String>CVE ids present in the CISA KEV catalog.
epss: BTreeMap<String, f32>CVE → EPSS probability (0.0–1.0).
cvss: BTreeMap<String, f32>CVE → CVSS base score (0.0–10.0) recovered from NVD, used to backfill the
severity and the numeric score of advisories that carry no CVSS of their
own. Empty on the offline (*_file) path.
Implementations§
Source§impl Enrichment
impl Enrichment
Sourcepub fn from_files(
kev_path: Option<&Path>,
epss_path: Option<&Path>,
) -> Result<Self, String>
pub fn from_files( kev_path: Option<&Path>, epss_path: Option<&Path>, ) -> Result<Self, String>
Load from local files (offline): KEV catalog JSON and/or EPSS CSV
(cve,epss,…). A None path contributes no data. The NVD CVSS
backfill is network-only, so it is empty here.
Sourcepub fn apply(&self, findings: &mut [VulnFinding])
pub fn apply(&self, findings: &mut [VulnFinding])
Annotate each finding from its CVE aliases: kev if any alias is in the
catalog, epss to the maximum score across its aliases. For findings
that scan as unknown, backfill both the severity and the numeric CVSS
score from the worst NVD score across its aliases (never downgrading a
severity the advisory already carries).
Trait Implementations§
Source§impl Clone for Enrichment
impl Clone for Enrichment
Source§fn clone(&self) -> Enrichment
fn clone(&self) -> Enrichment
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 Enrichment
impl Debug for Enrichment
Source§impl Default for Enrichment
impl Default for Enrichment
Source§fn default() -> Enrichment
fn default() -> Enrichment
Auto Trait Implementations§
impl Freeze for Enrichment
impl RefUnwindSafe for Enrichment
impl Send for Enrichment
impl Sync for Enrichment
impl Unpin for Enrichment
impl UnsafeUnpin for Enrichment
impl UnwindSafe for Enrichment
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> 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