#[non_exhaustive]pub struct Vulnerability {
pub cve: Option<Cve>,
pub offending_package: Option<Package>,
pub fixed_package: Option<Package>,
pub security_bulletin: Option<SecurityBulletin>,
pub provider_risk_score: i64,
pub reachable: bool,
pub cwes: Vec<Cwe>,
/* private fields */
}Expand description
Refers to common vulnerability fields e.g. cve, cvss, cwe etc.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cve: Option<Cve>CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)
offending_package: Option<Package>The offending package is relevant to the finding.
fixed_package: Option<Package>The fixed package is relevant to the finding.
security_bulletin: Option<SecurityBulletin>The security bulletin is relevant to this finding.
provider_risk_score: i64Provider provided risk_score based on multiple factors. The higher the risk score, the more risky the vulnerability is.
reachable: boolRepresents whether the vulnerability is reachable (detected via static analysis)
cwes: Vec<Cwe>Represents one or more Common Weakness Enumeration (CWE) information on this vulnerability.
Implementations§
Source§impl Vulnerability
impl Vulnerability
pub fn new() -> Self
Sourcepub fn set_or_clear_cve<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cve<T>(self, v: Option<T>) -> Self
Sourcepub fn set_offending_package<T>(self, v: T) -> Self
pub fn set_offending_package<T>(self, v: T) -> Self
Sets the value of offending_package.
§Example
use google_cloud_securitycenter_v2::model::Package;
let x = Vulnerability::new().set_offending_package(Package::default()/* use setters */);Sourcepub fn set_or_clear_offending_package<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_offending_package<T>(self, v: Option<T>) -> Self
Sets or clears the value of offending_package.
§Example
use google_cloud_securitycenter_v2::model::Package;
let x = Vulnerability::new().set_or_clear_offending_package(Some(Package::default()/* use setters */));
let x = Vulnerability::new().set_or_clear_offending_package(None::<Package>);Sourcepub fn set_fixed_package<T>(self, v: T) -> Self
pub fn set_fixed_package<T>(self, v: T) -> Self
Sets the value of fixed_package.
§Example
use google_cloud_securitycenter_v2::model::Package;
let x = Vulnerability::new().set_fixed_package(Package::default()/* use setters */);Sourcepub fn set_or_clear_fixed_package<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fixed_package<T>(self, v: Option<T>) -> Self
Sets or clears the value of fixed_package.
§Example
use google_cloud_securitycenter_v2::model::Package;
let x = Vulnerability::new().set_or_clear_fixed_package(Some(Package::default()/* use setters */));
let x = Vulnerability::new().set_or_clear_fixed_package(None::<Package>);Sourcepub fn set_security_bulletin<T>(self, v: T) -> Selfwhere
T: Into<SecurityBulletin>,
pub fn set_security_bulletin<T>(self, v: T) -> Selfwhere
T: Into<SecurityBulletin>,
Sets the value of security_bulletin.
§Example
use google_cloud_securitycenter_v2::model::SecurityBulletin;
let x = Vulnerability::new().set_security_bulletin(SecurityBulletin::default()/* use setters */);Sourcepub fn set_or_clear_security_bulletin<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityBulletin>,
pub fn set_or_clear_security_bulletin<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityBulletin>,
Sets or clears the value of security_bulletin.
§Example
use google_cloud_securitycenter_v2::model::SecurityBulletin;
let x = Vulnerability::new().set_or_clear_security_bulletin(Some(SecurityBulletin::default()/* use setters */));
let x = Vulnerability::new().set_or_clear_security_bulletin(None::<SecurityBulletin>);Sourcepub fn set_provider_risk_score<T: Into<i64>>(self, v: T) -> Self
pub fn set_provider_risk_score<T: Into<i64>>(self, v: T) -> Self
Sets the value of provider_risk_score.
§Example
let x = Vulnerability::new().set_provider_risk_score(42);Sourcepub fn set_reachable<T: Into<bool>>(self, v: T) -> Self
pub fn set_reachable<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for Vulnerability
impl Clone for Vulnerability
Source§fn clone(&self) -> Vulnerability
fn clone(&self) -> Vulnerability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more