Class ScanResultAction

java.lang.Object
org.jenkinsci.plugins.cortexcloud.publisher.ScanResultAction
All Implemented Interfaces:
Action, ModelObject, Serializable, RunAction2

public class ScanResultAction extends Object implements RunAction2, Serializable
Per-build action that surfaces a Cortex image-scan result. This is the Cortex equivalent of the legacy plugin's results action: it is attached to the Run, contributes a left-nav link and a build-summary box (rendered by summary.jelly / index.jelly), and exposes the parsed findings to those views. Gating already happened during the build step (driven by the CLI exit code); this action is purely for reporting. When the CLI produced no JSON, the findings tables are empty but the pass/fail badge and exit code are still shown.
See Also:
  • Constructor Details

    • ScanResultAction

      public ScanResultAction(String scanTarget, int exitCode, boolean passed, CortexScanResult result, String rawOutput)
  • Method Details

    • onAttached

      public void onAttached(Run<?,?> r)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Specified by:
      onLoad in interface RunAction2
    • getRun

      public Run<?,?> getRun()
      Returns:
      the build this action belongs to (used by the result view).
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getScanTarget

      public String getScanTarget()
    • getExitCode

      public int getExitCode()
    • isPassed

      public boolean isPassed()
    • getStatusLabel

      public String getStatusLabel()
    • hasResult

      public boolean hasResult()
    • getConsoleUrl

      public String getConsoleUrl()
    • getVulnerabilities

      public List<Vulnerability> getVulnerabilities()
      Flattened list of vulnerability findings across all scanned entities.
    • getComplianceIssues

      public List<Vulnerability> getComplianceIssues()
      Flattened list of compliance findings across all scanned entities.
    • getVulnerabilityCount

      public int getVulnerabilityCount()
    • getCriticalCount

      public int getCriticalCount()
    • getHighCount

      public int getHighCount()
    • getMediumCount

      public int getMediumCount()
    • getLowCount

      public int getLowCount()
    • getComplianceIssueCount

      public int getComplianceIssueCount()
    • getRawOutput

      public String getRawOutput()