Expand description
§use-cvss
CVSS severity, vector, and score metadata primitives for RustUse.
§Experimental
use-cvss is experimental while the use-security workspace remains below 0.3.0. Expect small API adjustments during the first release wave.
§Example
use use_cvss::{CvssScore, CvssSeverity, severity_from_score};
let score = CvssScore::new(9.8)?;
assert_eq!(score.value(), 9.8);
assert_eq!(severity_from_score(score), CvssSeverity::Critical);§Scope
- CVSS version, severity, metric, and vector metadata.
- Score range validation for values from
0.0through10.0. - Lightweight severity classification from a numeric score.
§Non-goals
- Full CVSS mathematical scoring.
- Vector metric normalization beyond non-empty validation.
- Vulnerability scanning or advisory lookup.
§License
Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license
Structs§
- Cvss
Metric Name - Cvss
Metric Value - Cvss
Score - A validated CVSS base score.
- Cvss
Vector
Enums§
- Cvss
Attack Complexity - CVSS attack-complexity labels.
- Cvss
Attack Vector - CVSS attack-vector labels.
- Cvss
Impact Level - CVSS impact-level labels.
- Cvss
Parse Error - Error returned when a CVSS label cannot be parsed.
- Cvss
Privileges Required - CVSS privileges-required labels.
- Cvss
Scope - CVSS scope labels.
- Cvss
Score Error - Error returned when a CVSS score is invalid.
- Cvss
Severity - CVSS severity labels.
- Cvss
Text Error - Error returned when CVSS text metadata is invalid.
- Cvss
User Interaction - CVSS user-interaction labels.
- Cvss
Version - CVSS version labels.
Functions§
- severity_
from_ score - Returns the CVSS severity bucket for a validated score.