#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Vulnerability
impl Debug for Vulnerability
Source§impl Default for Vulnerability
impl Default for Vulnerability
Source§fn default() -> Vulnerability
fn default() -> Vulnerability
Source§impl Message for Vulnerability
impl Message for Vulnerability
Source§impl PartialEq for Vulnerability
impl PartialEq for Vulnerability
impl StructuralPartialEq for Vulnerability
Auto Trait Implementations§
impl Freeze for Vulnerability
impl RefUnwindSafe for Vulnerability
impl Send for Vulnerability
impl Sync for Vulnerability
impl Unpin for Vulnerability
impl UnsafeUnpin for Vulnerability
impl UnwindSafe for Vulnerability
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request