Skip to main content

Crate use_cvss

Crate use_cvss 

Source
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.0 through 10.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§

CvssMetricName
CvssMetricValue
CvssScore
A validated CVSS base score.
CvssVector

Enums§

CvssAttackComplexity
CVSS attack-complexity labels.
CvssAttackVector
CVSS attack-vector labels.
CvssImpactLevel
CVSS impact-level labels.
CvssParseError
Error returned when a CVSS label cannot be parsed.
CvssPrivilegesRequired
CVSS privileges-required labels.
CvssScope
CVSS scope labels.
CvssScoreError
Error returned when a CVSS score is invalid.
CvssSeverity
CVSS severity labels.
CvssTextError
Error returned when CVSS text metadata is invalid.
CvssUserInteraction
CVSS user-interaction labels.
CvssVersion
CVSS version labels.

Functions§

severity_from_score
Returns the CVSS severity bucket for a validated score.