Enum Class Severity

java.lang.Object
java.lang.Enum<Severity>
org.jenkinsci.plugins.cortexcloud.shared.Severity
All Implemented Interfaces:
Serializable, Comparable<Severity>, Constable

public enum Severity extends Enum<Severity>
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.
  • Enum Constant Details

    • NONE

      public static final Severity NONE
    • LOW

      public static final Severity LOW
    • MEDIUM

      public static final Severity MEDIUM
    • HIGH

      public static final Severity HIGH
    • CRITICAL

      public static final Severity CRITICAL
  • Method Details

    • values

      public static Severity[] 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

      public static Severity valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName()
    • fromString

      public static Severity fromString(String value)
      Parses a CLI severity string (e.g. "high", "CRITICAL") into a Severity. Unknown or blank values map to NONE.
    • meetsOrExceeds

      public boolean meetsOrExceeds(Severity threshold)
      Returns:
      true when this severity is at least as severe as threshold.