Cvss

Struct Cvss 

Source
#[non_exhaustive]
pub struct Cvss { pub base_score: Option<f64>, pub depth: Option<String>, pub metrics: Option<Vec<Metric>>, pub overall_score: Option<f64>, pub severity: Option<String>, pub src_url: Option<String>, pub vector_string: Option<String>, pub vendor_name: Option<String>, pub version: Option<String>, }
Expand description

CVSS Score

The Common Vulnerability Scoring System (CVSS) object provides a way to capture the principal characteristics of a vulnerability and produce a numerical score reflecting its severity.

[] Category: | Name: cvss

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§base_score: Option<f64>

Base Score

The CVSS base score. For example: 9.1.

required

§depth: Option<String>

CVSS Depth

The CVSS depth represents a depth of the equation used to calculate CVSS score.

recommended

§metrics: Option<Vec<Metric>>

Metrics

The Common Vulnerability Scoring System metrics. This attribute contains information on the CVE’s impact. If the CVE has been analyzed, this attribute will contain any CVSSv2 or CVSSv3 information associated with the vulnerability. For example: { {“Access Vector”, “Network”}, {“Access Complexity”, “Low”}, …}.

optional

§overall_score: Option<f64>

Overall Score

The CVSS overall score, impacted by base, temporal, and environmental metrics. For example: 9.1.

recommended

§severity: Option<String>

Severity

The Common Vulnerability Scoring System (CVSS) Qualitative Severity Rating. A textual representation of the numeric score.

CVSS v2.0
  • Low (0.0 – 3.9)
  • Medium (4.0 – 6.9)
  • High (7.0 – 10.0)

CVSS v3.0
  • None (0.0)
  • Low (0.1 - 3.9)
  • Medium (4.0 - 6.9)
  • High (7.0 - 8.9)
  • Critical (9.0 - 10.0)

optional

§src_url: Option<String>

Source URL

The source URL for the CVSS score. For example: https://nvd.nist.gov/vuln/detail/CVE-2021-44228

optional

§vector_string: Option<String>

Vector String

The CVSS vector string is a text representation of a set of CVSS metrics. It is commonly used to record or transfer CVSS metric information in a concise form. For example: 3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H.

optional

§vendor_name: Option<String>

Vendor Name

The vendor that provided the CVSS score. For example: NVD, REDHAT etc.

recommended

§version: Option<String>

Version

The CVSS version. For example: 3.1.

required

Trait Implementations§

Source§

impl Clone for Cvss

Source§

fn clone(&self) -> Cvss

Returns a duplicate 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 Cvss

Source§

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

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

impl Default for Cvss

Source§

fn default() -> Cvss

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

impl<'de> Deserialize<'de> for Cvss
where Cvss: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Cvss

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Cvss

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Cvss

Auto Trait Implementations§

§

impl Freeze for Cvss

§

impl RefUnwindSafe for Cvss

§

impl Send for Cvss

§

impl Sync for Cvss

§

impl Unpin for Cvss

§

impl UnwindSafe for Cvss

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,