CVSS::V3::Vector class and metric enums (handles both v3.0 and v3.1)
CVSS::V3::Vector
A single class handles both CVSS v3.0 and CVSS v3.1; only the RoundUp algorithm and the modified-impact polynomial differ. The parsed version is preserved on to_s.
version: "9.9" (or any unsupported value) raises CVSS::Error.
Scoring
Method
Description
base_score : Float64
Spec base score with version-aware RoundUp.
temporal_score : Float64
Applies E/RL/RC multipliers. Equals base_score when no temporal metrics are set.
environmental_score : Float64
Applies CR/IR/AR + Modified-base overrides. v3.0 and v3.1 use different modified-impact polynomials.
Sub-scores
Method
Description
iss : Float64
Impact Sub-Score before scope-aware scaling.
impact_subscore : Float64
Scope-aware impact (the Impact term in the spec), floored at 0.0.
exploitability_subscore : Float64
The Exploitability term.
The Scope-Changed polynomial evaluates to -0.21808 when nothing is impacted
(S:C/C:N/I:N/A:N), a case base_score already reports as 0.0. impact_subscore
floors it so that neither it nor the impactScore JSON field can go negative —
the FIRST CVSS JSON Schema constrains every score field to 0..10. Call
CVSS::V3::Score.impact(vector) for the raw, unclamped formula output.