Class ImageBuildScanner

All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep, SimpleBuildStep

public class ImageBuildScanner extends AbstractBuildScanner
Build step that scans a container image with the Cortex CLI. This is the Cortex replacement for the legacy prismaCloudScanImage step. It works identically in freestyle jobs (added as a Build Step) and in Pipeline via its @Symbol: cortexScanImage image: 'myrepo/app:1.2.3' Pass/fail gating is driven by the CLI exit code (0 = pass, 1 = policy fail, other = error); when isFailBuildOnPolicyViolation() is enabled (the default) a policy fail or error aborts the build. Either way a ScanResultAction is attached so the findings are visible on the build page.
  • Constructor Details

    • ImageBuildScanner

      @DataBoundConstructor public ImageBuildScanner(String image)
  • Method Details

    • getImage

      public String getImage()
    • getDockerHost

      public String getDockerHost()
    • setDockerHost

      @DataBoundSetter public void setDockerHost(String dockerHost)
    • getScanName

      public String getScanName()
    • setScanName

      @DataBoundSetter public void setScanName(String scanName)
    • getSource

      public String getSource()
    • setSource

      @DataBoundSetter public void setSource(String source)
    • getUploadMode

      public String getUploadMode()
    • setUploadMode

      @DataBoundSetter public void setUploadMode(String uploadMode)
    • getSeverityThreshold

      public Severity getSeverityThreshold()
    • setSeverityThreshold

      @DataBoundSetter public void setSeverityThreshold(Severity severityThreshold)
    • perform

      public void perform(@NonNull Run<?,?> run, @NonNull FilePath workspace, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException
      Throws:
      InterruptedException
      IOException