pub struct AuditReport {
pub findings: Vec<ComponentAdvisories>,
pub vulnerabilities: Vulnerabilities,
pub failed_sources: Vec<String>,
pub omissions: Vec<Omission>,
}Expand description
The result of an audit: the vulnerable components (sorted by name then version), the per-severity totals across them, the names of any advisory sources that could not be reached, and the dependencies the component loading could not audit — so a caller can tell an incomplete run from a genuinely clean one.
Fields§
§findings: Vec<ComponentAdvisories>§vulnerabilities: Vulnerabilities§failed_sources: Vec<String>Advisory sources whose lookup failed; empty when every selected source answered.
omissions: Vec<Omission>Dependencies the audited component set does not cover (manifest/spec sources only —
non-registry specs, workspaces, failed optional deps; always empty for a lockfile audit).
Distinct from failed_sources: these are inputs never checked,
not advisory databases that failed. run_audit leaves this empty; the caller that
loaded the components fills it in.
Implementations§
Source§impl AuditReport
impl AuditReport
Sourcepub fn max_severity(&self) -> Option<Severity>
pub fn max_severity(&self) -> Option<Severity>
The highest severity present across all findings, if any.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the audit reached every selected source and covered every dependency. false
means the report may be missing advisories (see
failed_sources and omissions).
Sourcepub fn exceeds(&self, level: Severity) -> bool
pub fn exceeds(&self, level: Severity) -> bool
Whether any finding is at or above level — the --audit-level exit test. A confirmed
finding whose severity could not be determined (None) counts as exceeding any level: the
vulnerability is confirmed to affect the installed version, so an unknown severity keeps it
actionable rather than letting it pass silently.
Trait Implementations§
Source§impl Clone for AuditReport
impl Clone for AuditReport
Source§fn clone(&self) -> AuditReport
fn clone(&self) -> AuditReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more