enum

EPSS::Band

Inherits Enum < Comparable < Value < Object

Qualitative band for an EPSS score / percentile.

EPSS itself does not standardize severity labels โ€” FIRST publishes only the numeric probability (0.0โ€“1.0) and percentile. The bands below are a conventional five-bucket split used widely in tooling (e.g. CISA-style "high probability" callouts at the 90th+ percentile, low-noise floors below the 50th). They are stable and ordered so consumers can sort or threshold against them without committing to a hard cutoff in code.

EPSS::Band.from_percentile(0.97) # => EPSS::Band::Critical
EPSS::Band.from_epss(0.001)      # => EPSS::Band::None

Constants

None = 0
Low = 1
Medium = 2
High = 3
Critical = 4

Constructors

from_epss(score : Float64) : Band

Raw-probability banding. The EPSS score is an absolute probability of exploitation in the next 30 days, so the cutoffs are tighter than the percentile bands and skewed low โ€” a 10%+ probability is already operationally significant.

Source
from_percentile(percentile : Float64) : Band

Percentile-based banding. Percentile is a CVE's rank within the EPSS population (0.0 = least likely, 1.0 = most likely to be exploited). Bands follow common operational cutoffs at the 50th / 80th / 90th / 99th percentile.

Source
parse(value : String) : Band

Parse a case-insensitive band name. Accepts the labels emitted by #to_s so user-supplied CLI flags or config values round-trip without manual normalization.

EPSS::Band.parse("critical") # => EPSS::Band::Critical
EPSS::Band.parse?("nope")    # => nil
Source

Class methods

parse?(value : String) : Band | Nil
Source

Instance methods

at_least?(other : Band) : Bool

true when this band is at least as severe as other. Crystal's enum already orders these by declaration; this alias makes the intent obvious at call sites (score.band.at_least?(:high)).

Source
critical?

Returns true if this enum value equals Critical

Source
high?

Returns true if this enum value equals High

Source
low?

Returns true if this enum value equals Low

Source
medium?

Returns true if this enum value equals Medium

Source
none?

Returns true if this enum value equals None

Source
to_s(io : IO) : Nil

Appends a String representation of this enum member to the given io.

See also: to_s.

Source
to_s

Returns a String representation of this enum member. In the case of regular enums, this is just the name of the member. In the case of flag enums, it's the names joined by vertical bars, or "None", if the value is zero.

If an enum's value doesn't match a member's value, the raw value is returned as a string.

Color::Red.to_s                     # => "Red"
IOMode::None.to_s                   # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"

Color.new(10).to_s # => "10"
Source