#[repr(u8)]pub enum Requirement {
NotDefined = 0,
High = 1,
Medium = 2,
Low = 3,
}Expand description
Requirement metric (CR, IR, AR) values.
§Description
These metrics enable the consumer to customize the assessment
depending on the importance of the affected IT asset to the analyst’s
organization, measured in terms of Confidentiality, Integrity, and
Availability. That is, if an IT asset supports a business function for
which Availability is most important, the analyst can assign a greater
value to Availability metrics relative to Confidentiality and
Integrity. Each Security Requirement has three possible values: Low,
Medium, or High, or the default value of Not Defined (X).
The full effect on the environmental score is determined by the
corresponding Modified Base Impact metrics. Following the concept of
assuming “reasonable worst case”, in absence of explicit values, these
metrics are set to the default value of Not Defined (X), which is
equivalent to the metric value of High (H).
§Metrics
CR:Metric::ConfidentialityRequirementIR:Metric::IntegrityRequirementAR:Metric::AvailabilityRequirement
§Properties
- Metric Group: Environmental Metrics
- Documentation: CVSS v4.0 Specification, Section 4.1: Confidentiality, Integrity, and Availability Requirements (CR, IR, AR)
§Examples
Parse string as metric:
// parse string as metric
let metric: Metric = "CR:H".parse()?;
// check result
assert_eq!(metric, Metric::ConfidentialityRequirement(Requirement::High));Convert metric to string:
// convert metric to string
let s = Metric::IntegrityRequirement(Requirement::Low).to_string();
// check result
assert_eq!(s, "IR:L");Get metric name:
// get metric name
let name = Name::from(Metric::AvailabilityRequirement(Requirement::Low));
// check result
assert_eq!(name, Name::AvailabilityRequirement);Variants§
NotDefined = 0
Not Defined (X)
This is the default value. Assigning this value indicates there is insufficient information to choose one of the other values. This has the same effect as assigning High as the worst case.
High = 1
High (H)
Loss of [Confidentiality | Integrity | Availability] is likely to have a catastrophic adverse effect on the organization or individuals associated with the organization (e.g., employees, customers).
Medium = 2
Medium (M)
Loss of [Confidentiality | Integrity | Availability] is likely to have a serious adverse effect on the organization or individuals associated with the organization (e.g., employees, customers).
Low = 3
Low (L)
Loss of [Confidentiality | Integrity | Availability] is likely to have only a limited adverse effect on the organization or individuals associated with the organization (e.g., employees, customers).
Trait Implementations§
Source§impl Clone for Requirement
impl Clone for Requirement
Source§fn clone(&self) -> Requirement
fn clone(&self) -> Requirement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more