Artifact scans with Wiz
Scan container image and repository artifacts with Wiz, using Orchestration or Ingestion mode, from a containerized step group
You can set up a Wiz step to run automated scans in a Harness pipeline. This step scans the container image you specify using the Wiz CLI. Harness Security Testing Orchestration (STO) then correlates, deduplicates, and ingests the scan results. Go to the Vulnerabilities tab of the pipeline execution to view your scan results.
What you will learn from this topic
How to set up an Orchestration scan or an Ingestion scan for artifacts
How to configure the Wiz step settings, including scan mode, target, and authentication
How to view Wiz policy failures and use proxy settings
How to use a sample pipeline for Orchestration mode or Ingestion mode
Before you begin
To scan an artifact with Wiz, you need the following:
A CI Build or Security Tests stage in your pipeline.
A Kubernetes or Docker build infrastructure, if you are running an Orchestration scan.
Harness text secrets for your
client-idandclient-secretto authenticate with the Wiz CLI, and for your image registry access ID and access token, if your registry requires authentication.
Important notes for running Wiz scans in STO
The following notes apply when you run Wiz scans in STO:
You can set up your STO scan images and pipelines to run scans as non-root and establish trust for your proxies using custom certificates. For more information, go to Configure your pipeline to use STO images from private registry.
If you use Wiz for Gov or GovCloud on Linux or macOS, configure the
WIZ_ENVenvironment variable in your Wiz stage settings.For
app.wiz.us(Wiz for Gov, FedRAMP), setWIZ_ENV=fedramp.For
gov.wiz.io(GovCloud), setWIZ_ENV=gov.

Set-up workflows
Choose the workflow that matches whether you want Harness to run the Wiz CLI scan (Orchestration) or ingest scan results produced outside the Wiz step (Ingestion).
Wiz step settings reference
The recommended workflow is to add a Wiz step to a Security Tests or CI Build stage, and then configure the settings below.
Scan
Scan Mode sets whether the step runs a new Wiz CLI scan (Orchestration) or ingests results produced outside the step (Ingestion). Go to Wiz step settings reference for the full description of each mode.
Target
Type, Target and Variant Detection, Variant, and Workspace identify the artifact being scanned. Go to Wiz step settings reference for the full description of each field.
Name
The identifier for the target, such as jsmith/myalphaservice. Descriptive target names make it easier to navigate your scan data in the STO UI.
It is good practice to specify a baseline for every target.
Container image
Type, Domain, Name, Tag/Digest, Access ID, and Access Token identify and authenticate to the registry that hosts the scanned image. Go to Wiz step settings reference for the full description of each field.
Ingestion File
The path to your scan results when running an Ingestion scan, for example /shared/scan_results/wiz.latest.json.
The data file must be in a supported format for the scanner.
The data file must be accessible to the scan step. It is good practice to save your results files to a shared path in your stage. In the visual editor, go to the stage where you are running the scan, and then go to Overview -> Shared Paths. You can also add the path to the YAML stage definition, for example:
Authentication
Access ID
This is your client-id to authenticate with the Wiz CLI.
Access Token
This is your client-secret to authenticate with the Wiz CLI.
Create a Harness text secret with your encrypted token, and reference the secret using the format <+secrets.getValue("my-access-token")>. For more information, go to Add and reference text secrets.
Log Level
Set the logging verbosity for the Wiz CLI. Go to Wiz step settings reference for the full description.
Additional CLI flags
Pass additional flags directly to the Wiz CLI.
Fail on Severity
Stop the pipeline if the scan detects any issues at a specified severity or higher.
Settings
You can add more settings to the scan step as needed.
Additional Configuration
The fields under Additional Configuration vary based on the type of infrastructure. Depending on the infrastructure type you select, some fields might not appear in your settings.
Override Security Test Image: Container Registry and Image Tag.
Advanced settings
In Advanced, you can use the following options:
View Wiz policy failures
Wiz policy failure results appear in the scan results as an Info level issue, categorized as an External Policy issue type. Go to Wiz step settings reference for the full procedure to configure external policy failures and map them to a severity level.
Proxy settings
This step supports private network connectivity if you use Harness Cloud infrastructure. Go to Wiz step settings reference for the HTTPS_PROXY, HTTP_PROXY, and NO_PROXY variable definitions and configuration steps.
Sample Pipeline
The following examples show a sample pipeline for each scan mode.
Next steps
Go to Containerize step groups to run this step on your Kubernetes cluster.
Go to Background step to configure the Docker-in-Docker step an Orchestration scan requires.
Go to What's supported in STO, Security Testing Orchestration FAQs, and Optimize STO pipelines for more on setting up scanner integrations in STO.
Last updated
Was this helpful?