pub struct VulnerabilityOccurrence {
Show 14 fields pub type: String, pub severity: i32, pub cvss_score: f32, pub cvssv3: Option<Cvss>, pub package_issue: Vec<PackageIssue>, pub short_description: String, pub long_description: String, pub related_urls: Vec<RelatedUrl>, pub effective_severity: i32, pub fix_available: bool, pub cvss_version: i32, pub cvss_v2: Option<Cvss>, pub vex_assessment: Option<VexAssessment>, pub extra_details: String,
}
Expand description

An occurrence of a severity vulnerability on a resource.

Fields§

§type: String

The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

§severity: i32

Output only. The note provider assigned severity of this vulnerability.

§cvss_score: f32

Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.

§cvssv3: Option<Cvss>

The cvss v3 score for the vulnerability.

§package_issue: Vec<PackageIssue>

Required. The set of affected locations and their fixes (if available) within the associated resource.

§short_description: String

Output only. A one sentence description of this vulnerability.

§long_description: String

Output only. A detailed description of this vulnerability.

§related_urls: Vec<RelatedUrl>

Output only. URLs related to this vulnerability.

§effective_severity: i32

The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity.

When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.

§fix_available: bool

Output only. Whether at least one of the affected packages has a fix available.

§cvss_version: i32

Output only. CVSS version used to populate cvss_score and severity.

§cvss_v2: Option<Cvss>

The cvss v2 score for the vulnerability.

§vex_assessment: Option<VexAssessment>§extra_details: String

Occurrence-specific extra details about the vulnerability.

Implementations§

source§

impl VulnerabilityOccurrence

source

pub fn severity(&self) -> Severity

Returns the enum value of severity, or the default if the field is set to an invalid enum value.

source

pub fn set_severity(&mut self, value: Severity)

Sets severity to the provided enum value.

source

pub fn effective_severity(&self) -> Severity

Returns the enum value of effective_severity, or the default if the field is set to an invalid enum value.

source

pub fn set_effective_severity(&mut self, value: Severity)

Sets effective_severity to the provided enum value.

source

pub fn cvss_version(&self) -> CvssVersion

Returns the enum value of cvss_version, or the default if the field is set to an invalid enum value.

source

pub fn set_cvss_version(&mut self, value: CvssVersion)

Sets cvss_version to the provided enum value.

Trait Implementations§

source§

impl Clone for VulnerabilityOccurrence

source§

fn clone(&self) -> VulnerabilityOccurrence

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VulnerabilityOccurrence

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VulnerabilityOccurrence

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for VulnerabilityOccurrence

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for VulnerabilityOccurrence

source§

fn eq(&self, other: &VulnerabilityOccurrence) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for VulnerabilityOccurrence

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more