This documentation space will be inaccessible starting January 9th, 2023.
All the pages will continue to be available in Mend's Knowledge Hub at, which we encourage you to visit today.
To make the transition as easy as possible, until January 9th, 2023, deprecated pages will contain a direct link to the new Knowledge Hub.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 45 Next »


This page describes how to integrate Amazon ECR with the Unified Agent to be able to scan Docker Images.


  • An authorized account to Amazon ECR and can pull images from Amazon ECR

  • Installations of Amazon AWS CLI and Docker

  • Unified Agent will scan the images on your local host (after these have been pulled from Amazon ECR)

  • Unified Agent requires downloading a JAR file and a configuration file. You can download them manually or by using the steps described below.

Downloading the Unified Agent and Configuration File

Notice on periodically fetching the Unified Agent

It is advised to use the below commands only once a week to download the latest version of the Unified Agent for performance reasons, and not as part of every build. You can do this using a scheduler task, such as cron.

Use the following options to download the latest version of the WhiteSource Unified Agent JAR file and configuration file to your local host.

  1. Windows Using CURL

    1. Download CURL, and add it to your PATH environment variable.

    2. Open a new command prompt, and run the following commands:

      Windows Using CURL

      curl -LJO ""
      curl -LJO ""
  2. Windows Using PowerShell

    • Open a new command prompt, and run the following commands:

      Windows Using PowerShell

      powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND $pwd\wss-unified-agent.jar 
      powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND $pwd\wss-unified-agent.config 

      NOTE: To use PowerShell on Windows, ensure that Background Intelligent Transfer Service (BITS) is enabled.

  3. Windows - Manual Download
    Download the following files manually using your web browser or any other download manager:

  4. Linux/Unix
    Run the following commands from the Linux/Unix bash prompt :

    Linux/Unix Using CURL

    curl -LJO ""
    curl -LJO ""

Update Configuration File

  1. Update the configuration file (wss-unified-agent.config) that you previously downloaded according to your specific requirements.

  2. Enable the relevant lines by removing the '#' symbol at the beginning of the lines. 

Example of values for uncommented lines:

docker.excludes=.*2017.10.01.* .*2017.06.01.*

This configuration sets the Unified Agent to scan all the docker repositories named *alpine.* except for the two image tags in the exclude section.

Alternatively, leave the docker.excludes parameter commented if you want to scan all your image containers. 

Configuration Parameters







Space separated list specifying which files to include in the scan.




Space separated list specifying which files to exclude in the scan.




Indicates whether or not to scan images.  

No. Default is true



When true then pulls from all relevant registries. When false does not pull from registries.

No. Default is false



Indicates which images to pull. Value can be a GLOB pattern or a list of values separated by spaces.
Example:' .* github .*'  includes among others,  'github-scanner' and 'test/github'.

No. Default is '. * . * '



Indicates which tags to pull. Value can include GLOB pattern or a list of values separated by space (e.g., 'latest' or GLOB pattern such as '. * 18.6 . *').

No. Default is '. * . * '



The content-addressable identifier called a digest. As long as the input used to generate the image is unchanged, the digest value is predictable.
Can be '.' or or a list of explicit values separated by space. Cannot include GLOB patterns such as '.98765'.

No. Default is '. * . * '



Enables to use Docker to delete images with the 'force' flag. This is required if the user pulled images that are related to other images, and in such cases a regular delete may not work properly.

No. Default is false


Enables pulling Docker Images from Amazon ECR.

No. Default is false


The Registry IDs list on Amazon Web Services (the AWS 12-digit account IDs that correspond to the Amazon ECR registries). The  list must include the following:

  • Full registry IDs and no GLOB patterns. 

  • At least one registry ID. Values are space-delimited.

NOTE: Required if




WhiteSource stops pulling more images when the indicated value of pulled images is reached, 

No. Defualt is 10



Docker login requires user to use 'sudo' or 'root' user. When set to true, login is as a 'sudo' user.

No. Default is true.

Running the Unified Agent

Run the Unified Agent with the modified configuration file via this command:

java -jar wss-unified-agent.jar -apiKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx -c wss-unified-agent.config

Scanning Information

The scanner saves your required images and scans the entire file system and installed packages.
It scans all the image layers, and handles archive files in the layers based on the value in the property archiveExtractionDepth.

The Docker image is saved to the temporary directory defined in your environment and is deleted immediately after the scan.

The scanning results are presented in a new WhiteSource project identified by the name of the image in the following format:  <image id> <repository> <tag>.
The project is created in the WhiteSource product specified in the configuration file or command line.

(Optional) Performing Manual Scanning of Images (instead of using ECR automated image pulling)

Pull Docker Images From Amazon ECR Before Scanning

You need to pull the Docker images that you want to scan. Pull the images from Amazon ECR using Docker's command:

Docker Pull Image
docker pull {aws_account_id}.dkr.ecr.{region}{image}:{tag}


docker pull {aws_account_id}

docker pull {aws_account_id}

For more information, refer to the following Amazon website links:

  • No labels