#[non_exhaustive]pub struct Cve {
pub id: String,
pub references: Vec<Reference>,
pub cvssv3: Option<Cvssv3>,
pub upstream_fix_available: bool,
pub impact: RiskRating,
pub exploitation_activity: ExploitationActivity,
pub observed_in_the_wild: bool,
pub zero_day: bool,
pub exploit_release_date: Option<Timestamp>,
pub first_exploitation_date: Option<Timestamp>,
/* private fields */
}Expand description
CVE stands for Common Vulnerabilities and Exposures. Information from the CVE record that describes this vulnerability.
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.id: StringThe unique identifier for the vulnerability. e.g. CVE-2021-34527
references: Vec<Reference>Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
cvssv3: Option<Cvssv3>Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document
upstream_fix_available: boolWhether upstream fix is available for the CVE.
impact: RiskRatingThe potential impact of the vulnerability if it was to be exploited.
exploitation_activity: ExploitationActivityThe exploitation activity of the vulnerability in the wild.
observed_in_the_wild: boolWhether or not the vulnerability has been observed in the wild.
zero_day: boolWhether or not the vulnerability was zero day when the finding was published.
exploit_release_date: Option<Timestamp>Date the first publicly available exploit or PoC was released.
first_exploitation_date: Option<Timestamp>Date of the earliest known exploitation.
Implementations§
Source§impl Cve
impl Cve
pub fn new() -> Self
Sourcepub fn set_references<T, V>(self, v: T) -> Self
pub fn set_references<T, V>(self, v: T) -> Self
Sets the value of references.
§Example
use google_cloud_securitycenter_v2::model::Reference;
let x = Cve::new()
.set_references([
Reference::default()/* use setters */,
Reference::default()/* use (different) setters */,
]);Sourcepub fn set_cvssv3<T>(self, v: T) -> Self
pub fn set_cvssv3<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_cvssv3<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cvssv3<T>(self, v: Option<T>) -> Self
Sourcepub fn set_upstream_fix_available<T: Into<bool>>(self, v: T) -> Self
pub fn set_upstream_fix_available<T: Into<bool>>(self, v: T) -> Self
Sets the value of upstream_fix_available.
§Example
let x = Cve::new().set_upstream_fix_available(true);Sourcepub fn set_impact<T: Into<RiskRating>>(self, v: T) -> Self
pub fn set_impact<T: Into<RiskRating>>(self, v: T) -> Self
Sourcepub fn set_exploitation_activity<T: Into<ExploitationActivity>>(
self,
v: T,
) -> Self
pub fn set_exploitation_activity<T: Into<ExploitationActivity>>( self, v: T, ) -> Self
Sets the value of exploitation_activity.
§Example
use google_cloud_securitycenter_v2::model::cve::ExploitationActivity;
let x0 = Cve::new().set_exploitation_activity(ExploitationActivity::Wide);
let x1 = Cve::new().set_exploitation_activity(ExploitationActivity::Confirmed);
let x2 = Cve::new().set_exploitation_activity(ExploitationActivity::Available);Sourcepub fn set_observed_in_the_wild<T: Into<bool>>(self, v: T) -> Self
pub fn set_observed_in_the_wild<T: Into<bool>>(self, v: T) -> Self
Sets the value of observed_in_the_wild.
§Example
let x = Cve::new().set_observed_in_the_wild(true);Sourcepub fn set_zero_day<T: Into<bool>>(self, v: T) -> Self
pub fn set_zero_day<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_exploit_release_date<T>(self, v: T) -> Self
pub fn set_exploit_release_date<T>(self, v: T) -> Self
Sets the value of exploit_release_date.
§Example
use wkt::Timestamp;
let x = Cve::new().set_exploit_release_date(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_exploit_release_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_exploit_release_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of exploit_release_date.
§Example
use wkt::Timestamp;
let x = Cve::new().set_or_clear_exploit_release_date(Some(Timestamp::default()/* use setters */));
let x = Cve::new().set_or_clear_exploit_release_date(None::<Timestamp>);Sourcepub fn set_first_exploitation_date<T>(self, v: T) -> Self
pub fn set_first_exploitation_date<T>(self, v: T) -> Self
Sets the value of first_exploitation_date.
§Example
use wkt::Timestamp;
let x = Cve::new().set_first_exploitation_date(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_first_exploitation_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_first_exploitation_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of first_exploitation_date.
§Example
use wkt::Timestamp;
let x = Cve::new().set_or_clear_first_exploitation_date(Some(Timestamp::default()/* use setters */));
let x = Cve::new().set_or_clear_first_exploitation_date(None::<Timestamp>);