You can ingest container-image scan results from Aqua Security Enterprise.
Important notes for running Aqua Security scans in STO
The following use cases require a Docker-in-Docker background step in your pipeline:
- Container image scans on Kubernetes and Docker build infrastructures
- Required for Orchestration and Dataload scan modes
- Security steps (not step palettes) on Kubernetes and Docker build infrastructures
- Required for all target types and Orchestration/DataLoad modes
The following use cases do not require Docker-in-Docker:
- Harness Cloud AMD64 build infrastructures
- SAST/DAST/configuration scans that use scanner templates (not Security steps)
- Ingestion scans where the data file has already been generated
Set up a Docker-in-Docker background step
Go to the stage where you want to run the scan.
In Overview, add the shared path
In Execution, do the following:
Click Add Step and then choose Background.
Configure the Background step as follows:
Dependency Name =
Container Registry = The Docker connector to download the DinD image. If you don't have one defined, go to Docker connector settings reference.
Under Entry Point, add the following:
In most cases, using
dockerdis a faster and more secure way to set up the background step. For more information, go to the TLS section in the Docker quick reference.
If the DinD service doesn't start with
dockerd, clear the Entry Point field and then run the pipeline again. This starts the service with the default entry point.
- Under Optional Configuration, select the Privileged checkbox.
- Visual setup
- YAML setup
Add a Background step to your pipeline and set it up as follows:
Root access requirements
You need to run the scan step with root access if either of the following apply:
You need to run a Docker-in-Docker background service.
You need to add trusted certificates to your scan images at runtime.
You can set up your STO scan images and pipelines to run scans as non-root and establish trust for your own proxies using self-signed certificates. For more information, go to Configure STO to Download Images from a Private Registry.
For more information
The following topics contain useful information for setting up scanner integrations in STO:
Aqua Security step settings for STO scans
The recommended workflow is add an Aqua Security step to a Security Tests or CI Build stage and then configure it as described below.
- Orchestration Configure the step to run a scan and then ingest, normalize, and deduplicate the results.
- Ingestion Configure the step to read scan results from a data file and then ingest, normalize, and deduplicate the data.
The predefined configuration to use for the scan. All scan steps have at least one configuration.
- Container Image Scan the layers, libraries, and packages in a container image.
The identifier for the target, such as
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.
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.
The registry type where the image is stored:
The URL of the artifact repository that contains the image to scan. Examples include:
The image name. For non-local images, you also need to specify the image repository. Example:
The image tag. Examples:
The region where the image to scan is located, as defined by the cloud provider such as AWS.
The fully-qualified URL to the scanner.
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.
The AWS region of the image to scan.
The path to your scan results when running an Ingestion scan, for example
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:
Log Level, CLI flags, and Fail on Severity
The minimum severity of the messages you want to include in your scan logs. You can specify one of the following:
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:
NONE— Do not fail on severity
The YAML definition looks like this:
fail_on_severity : critical # | high | medium | low | info | none
In the Additional Configuration settings, you can use the following options:
In the Advanced settings, you can use the following options: