Expand description
Rust implementation of the Common Vulnerability Scoring System (v2 / v3.0 / v3.1).
Supports parsing, generation and score calculation (base, temporal, environmental) for CVSS vectors v2/v3.0/v3.1
Current CVSS version is v3.1, but v3.0 and v2 are still in use.
§Example
use cvssrust::v3::V3Vector;
use cvssrust::CVSSScore;
use std::str::FromStr;
let cvss_str = "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P/RL:W/RC:C";
let cvss = V3Vector::from_str(cvss_str).unwrap();
assert_eq!(cvss.to_string(), String::from(cvss_str));
assert_eq!(cvss.base_score().value(), 6.1);
assert_eq!(cvss.base_score().severity().to_string(), "Medium");
assert_eq!(cvss.temporal_score().value(), 5.6);
Modules§
Structs§
- Score
- Base/Temporal/Environmental CVSS Score
Enums§
- CVSS
- Enum type and parser for CVSS of all supported versions.
- Parse
Error - Parsing error type
- Severity
- Qualitative Severity Rating Scale