pub struct Base {
pub minor_version: usize,
pub av: Option<AttackVector>,
pub ac: Option<AttackComplexity>,
pub pr: Option<PrivilegesRequired>,
pub ui: Option<UserInteraction>,
pub s: Option<Scope>,
pub c: Option<Confidentiality>,
pub i: Option<Integrity>,
pub a: Option<Availability>,
}
Expand description
CVSS v3.1 Base Metric Group
Described in CVSS v3.1 Specification: Section 2: https://www.first.org/cvss/specification-document#t6
The Base metric group represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. It is composed of two sets of metrics: the Exploitability metrics and the Impact metrics.
The Exploitability metrics reflect the ease and technical means by which the vulnerability can be exploited. That is, they represent characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component. The Impact metrics reflect the direct consequence of a successful exploit, and represent the consequence to the thing that suffers the impact, which we refer to formally as the impacted component.
While the vulnerable component is typically a software application, module, driver, etc. (or possibly a hardware device), the impacted component could be a software application, a hardware device or a network resource. This potential for measuring the impact of a vulnerability other than the vulnerable component, was a key feature introduced with CVSS v3.0. This property is captured by the Scope metric.
Fields
minor_version: usize
Minor component of the version
av: Option<AttackVector>
Attack Vector (AV)
ac: Option<AttackComplexity>
Attack Complexity (AC)
pr: Option<PrivilegesRequired>
Privileges Required (PR)
ui: Option<UserInteraction>
User Interaction (UI)
s: Option<Scope>
Scope (S)
c: Option<Confidentiality>
Confidentiality Impact (C)
i: Option<Integrity>
Integrity Impact (I)
a: Option<Availability>
Availability Impact (A)
Implementations
sourceimpl Base
impl Base
sourcepub fn score(&self) -> Score
Available on crate feature std
only.
pub fn score(&self) -> Score
std
only.Calculate Base CVSS score: overall value for determining the severity of a vulnerability, generally referred to as the “CVSS score”.
Described in CVSS v3.1 Specification: Section 2: https://www.first.org/cvss/specification-document#t6
When the Base metrics are assigned values by an analyst, the Base equation computes a score ranging from 0.0 to 10.0.
Specifically, the Base equation is derived from two sub equations: the Exploitability sub-score equation, and the Impact sub-score equation. The Exploitability sub-score equation is derived from the Base Exploitability metrics, while the Impact sub-score equation is derived from the Base Impact metrics.
sourcepub fn exploitability(&self) -> Score
pub fn exploitability(&self) -> Score
Calculate Base Exploitability score: sub-score for measuring ease of exploitation.
Described in CVSS v3.1 Specification: Section 2: https://www.first.org/cvss/specification-document#t6
The Exploitability metrics reflect the ease and technical means by which the vulnerability can be exploited. That is, they represent characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.
sourcepub fn impact(&self) -> Score
Available on crate feature std
only.
pub fn impact(&self) -> Score
std
only.Calculate Base Impact Score (ISS): sub-score for measuring the consequences of successful exploitation.
Described in CVSS v3.1 Specification: Section 2: https://www.first.org/cvss/specification-document#t6
The Impact metrics reflect the direct consequence of a successful exploit, and represent the consequence to the thing that suffers the impact, which we refer to formally as the impacted component.
sourcepub fn severity(&self) -> Severity
Available on crate feature std
only.
pub fn severity(&self) -> Severity
std
only.Calculate Base CVSS Severity
according to the
Qualitative Severity Rating Scale (i.e. Low / Medium / High / Critical)
Described in CVSS v3.1 Specification: Section 5: https://www.first.org/cvss/specification-document#t17
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Base
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Base
serde
only.sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Base
impl StructuralEq for Base
impl StructuralPartialEq for Base
Auto Trait Implementations
impl RefUnwindSafe for Base
impl Send for Base
impl Sync for Base
impl Unpin for Base
impl UnwindSafe for Base
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more