Skip to main content

AWS ECR scanner reference

You can scan your container images using Amazon Elastic Container Registry (ECR).

AWS ECR step configuration

The recommended workflow is add an AWS ECR step to a Security Tests or CI Build stage and then configure it as described below. You can also configure scans programmatically by copying, pasting, and editing the YAML definition.

  • UI configuration support is currently limited to a subset of scanners. Extending UI support to additional scanners is on the Harness engineering roadmap.
  • Each scanner template shows only the options that apply to a specific scan. If you're setting up a repository scan, for example, the UI won't show Container Image settings.
  • Docker-in-Docker is not required for these steps unless you're scanning a container image. If you're scanning a repository using Bandit, for example, you don't need to set up a Background step running DinD.
  • Support is currently limited to Kubernetes and Harness Cloud AMD64 build infrastructures only.

Scan settings

Scan Mode

  • Extraction A partially-orchestrated scan. The Security step pulls scan results from an external SaaS service and then normalizes and compresses the data.

Scan Configuration

The predefined configuration to use for the scan. All scan steps have at least one configuration.

Target Settings


  • Container Image Scan the layers, libraries, and packages in a container image.


The Identifier that you want to assign to the target you’re scanning in the pipeline. Use a unique, descriptive name such as codebaseAlpha or jsmith/myalphaservice.


An identifier for a specific variant to scan, such as the branch name or image tag. This identifier is used to differentiate or group results for a target. Harness maintains a historical trend for each variant.

Container Image settings

Type (orchestration)

The registry type where the image is stored:

Domain (extraction)

The URL of the artifact repository that contains the image to scan. Examples:



The image name. For non-local images, you also need to specify the image repository. Example: jsmith/myalphaservice


The image tag. Examples: latest, 1.2.3


The region where the image to scan is located, as defined by the cloud provider such as AWS.

Authentication settings

Access ID (orchestration)

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.container-access-id">. For more information, go to Add and Reference Text Secrets.

Access Region

The AWS region of the image to scan.

Ingestion settings

Ingestion File

The results data file to use when running an Ingestion scan. STO steps can ingest scan data in SARIF and Harness Custom JSON format. Generally an Ingestion scan consists of a scan step (to generate the data file) and an ingestion step (to ingest the data file).

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:

  • INFO

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:

  • HIGH
  • LOW
  • INFO
  • NONE — Do not fail on severity

The YAML definition looks like this: fail_on_severity : critical # | high | medium | low | info | none

Additional Configuration

In the Additional Configuration settings, you can use the following options:

Advanced settings

In the Advanced settings, you can use the following options: