Class ScanOutcome

java.lang.Object
org.jenkinsci.plugins.cortexcloud.scanner.ScanOutcome
All Implemented Interfaces:
Serializable

public class ScanOutcome extends Object implements Serializable
Result of running the Cortex CLI: the process exit code, the (best-effort) parsed JSON result, and the captured raw output. Gating is driven by getExitCode() - 0 = pass, 1 = policy fail, anything else = error - matching the legacy plugin's "pass/fail from the CLI" model. getResult() may be null when the CLI does not emit JSON (e.g. CLI v0.31.0), in which case the findings table is empty but gating still works.
See Also:
  • Constructor Details

  • Method Details

    • getExitCode

      public int getExitCode()
    • getResult

      public CortexScanResult getResult()
      Returns:
      the parsed result, or null if the CLI produced no parseable JSON.
    • getRawOutput

      public String getRawOutput()
    • isPass

      public boolean isPass()
      Returns:
      true when the scan passed policy (exit code 0).
    • isPolicyFailure

      public boolean isPolicyFailure()
      Returns:
      true when the scan ran and explicitly failed policy (exit code 1).
    • isError

      public boolean isError()
      Returns:
      true when the CLI errored out (bad args, license/service issue, etc.).