Enum Class Severity
- All Implemented Interfaces:
Serializable,Comparable<Severity>,Constable
Ordered vulnerability severity levels, used for plugin-side gating.
Rationale: the Cortex CLI (v0.31.0, verified on a live tenant) returns exit
code 0 even for images with Critical CVEs - pass/fail at the exit-code level is
a tenant-policy decision that this CLI version does not enforce. To let a
pipeline block on findings regardless of tenant policy, the plugin can apply a
severity threshold to the parsed findings.
Ordinal order is significant: higher ordinal == more severe. NONE disables
threshold gating.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SeverityfromString(String value) Parses a CLI severity string (e.g.booleanmeetsOrExceeds(Severity threshold) static SeverityReturns the enum constant of this class with the specified name.static Severity[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
LOW
-
MEDIUM
-
HIGH
-
CRITICAL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayName
-
fromString
Parses a CLI severity string (e.g. "high", "CRITICAL") into a Severity. Unknown or blank values map to NONE.
-