STO scanner template UI reference
Some Security steps include a scanner template UI for setting up a scan. This topic describes the settings available in the UI.
Configuring an STO scanner template
To set up a scan using the scanner template, add a SecurityTests or a CI Build stage to your pipeline. Then add a step for the scanner of interest and configure the step using the available options.
Scanner Template example
Scan settings
Scan Mode
- Orchestration Configure the step to run a scan and then ingest, normalize, and deduplicate the results.
- Extraction Configure the step to extract scan results from an external SaaS service and then ingest, normalize, and deduplicate the data.
- Ingestion Configure the step to read scan results from a data file and then ingest, normalize, and deduplicate the data.
Scan Configuration
The predefined configuration to use for the scan. All scan steps have at least one configuration.
Target Settings
Type
The target type to scan for vulnerabilities.
-
Repository Scan a codebase repo.
In most cases, you specify the codebase using a code repo connector that connects to the Git account or repository where your code is stored. For information, go to Configure codebase.
- Container Image Scan the layers, libraries, and packages in a container image.
- Instance Scan a running application.
- Configuration Scan your cloud environment by gathering configuration data via the cloud provider’s APIs.
Name
The identifier for the target, such as codebaseAlpha
or jsmith/myalphaservice
. Descriptive target names make it much easier to navigate your scan data in the STO UI.
It is good practice to specify a baseline for every target.
Variant
The identifier for the specific variant to scan. This is usually the branch name, image tag, or product version. Harness maintains a historical trend for each variant.
Workspace (repository)
The identifier for the specific variant to scan. This is usually the branch name, image tag, or product version. Harness maintains a historical trend for each variant.
Ingestion Settings
Ingestion File (ingestion)
The path to your scan results when running an Ingestion scan, for example /shared/scan_results/myscan.latest.sarif
.
-
The data file must be in a supported format for the scanner.
-
The data file must be accessible to the scan step. It's good practice to save your results files to a shared path in your stage. In the visual editor, go to the stage where you're running the scan. Then go to Overview > Shared Paths. You can also add the path to the YAML stage definition like this:
- stage:
spec:
sharedPaths:
- /shared/scan_results
Authentication Settings
Domain (extraction)
The fully-qualified URL to the scanner.
Enforce SSL
The step and the scanner communicate over SSL by default. Set this to false to disable SSL (not safe).
API Version
The scanner API version. Some scanners require this.
Type
The scanner API version. Specify one of the following:
- Username & Password
- API Key
Access ID (orchestration)
The username to log in to the scanner.
Access Token
The access token to log in to the scanner. In most cases this is a password or an API key.
You should create a Harness text secret with your encrypted token and reference the secret using the format <+secrets.getValue("project.my-access-token")>
. For more information, go to Add and Reference Text Secrets.
Container Image settings
Type (orchestration)
The registry type where the image is stored:
-
Docker v2 A registry that uses the Docker Registry v2 API such as Docker Hub, Google Container Registry, or Google Artifact Registry.
-
Local Image
Domain (extraction)
The URL of the artifact repository that contains the image to scan. Examples include:
docker.io
app.harness.io/registry
us-east1-docker.pkg.dev
us.gcr.io
Name
The image name. For non-local images, you also need to specify the image repository. Example: jsmith/myalphaservice
Tag
The image tag. Examples: latest
, 1.2.3
Access Id
The username to log in to the container registry.
Access Token
The access token used to log in to the container registry. In most cases this is a password or an API key.
You should create a Harness text secret with your encrypted token and reference the secret using the format <+secrets.getValue("project.container-access-id")>
. For more information, go to Add and Reference Text Secrets.
Region
The region where the image to scan is located, as defined by the cloud provider such as AWS.
Scan Tool Settings
Project Name
The name of the scan project as defined in the scanner. This is the also the target name in the Harness UI (Security Tests > Test Targets).
Project Version
The version of the scan project, as defined in the scanner.
Include
The initial scope for the scan. This should match the format required by the scanner.
Exclude
Exclusions to the initial scope for the scan. This should match the format required by the scanner.
Context Name
The context to use for the scan. If you’re running a ZAP scan, for example, you can define contexts to include multiple URLs in the same scan.
Context Name (images)
The image to specify when you’re looking to ingest data from a previous scan. If you’re running a Prisma Cloud scan, for example, you can specify the image name and get the latest scan for that image.
Team Name
The product team name. In Checkmarx, for example, supports team names in the format /<server-name>/<team-name>
such as /server1.myorg.org/devOpsEast
.
Port
The TCP port to communicate with the scanner. You can specify this to override the default port for that scanner.
Java Libraries
A comma-separated list of paths to files with third-party libraries used by your tests. If you’re running a SonarQube scan, for example, this corresponds to the sonar.java.libraries
parameter.
Java Binaries
A comma-separated list of paths to the folders with the bytecode files you want to scan. If you’re running a SonarQube scan, for example, this corresponds to the sonar.java.binaries
parameter.
Product Token
The access token used to log in to a specific product in the scanner. This is required for some scans. In most cases this is a password or an API key.
You should create a Harness text secret with your encrypted token and reference the secret using the format <+secrets.getValue("project.container-access-id")>
. For more information, go to Add and Reference Text Secrets.
Name
The access ID used to look up a specific product in the scanner. This is required for some product suites such as Prisma Cloud.
You might want to create a Harness text secret with your encrypted Id and reference the secret using the format <+secrets.getValue("project.container-access-id")>
. For more information, go to Add and Reference Text Secrets.
Project Token
The access token used to log in to a specific product in the scanner. This is required for some scans. In most cases this is a password or an API key.
You should create a Harness text secret with your encrypted token and reference the secret using the format <+secrets.getValue("project.container-access-id")>
. For more information, go to Add and Reference Text Secrets.
Lookup Type
The type of key used to look up the object to scan: password or API key.
Instance settings
Domain
Domain of the application instance to scan. You can include the full path to the app in this field, or split the full path between the Domain and the Path fields. Example: https://myapp.io/portal/us
Protocol
HTTPS (default) or HTTP.
Port
The TCP port used by the scanned app instance.
Path
Path to append to the application instance domain, if you're splitting the full path between the Domain and Path settings. For example, you might specify the domain as https://myapp.io
and the path as /portal/us
.
Log Level, CLI flags, and Fail on Severity
Log Level
The minimum severity of the messages you want to include in your scan logs. You can specify one of the following:
- DEBUG
- INFO
- WARNING
- ERROR
Additional CLI flags
You can use this field to customize the scan with specific command-line arguments supported by that scanner.
Fail on Severity
Every Security step has a Fail on Severity setting. If the scan finds any vulnerability with the specified severity level or higher, the pipeline fails automatically. You can specify one of the following:
CRITICAL
HIGH
MEDIUM
LOW
INFO
NONE
— Do not fail on severity
The YAML definition looks like this: fail_on_severity : critical # | high | medium | low | info | none