Trivy Bulk Scanner is a Go module that helps you bulk scan a list of Docker images using Trivy.
The Trivy Bulk Scanner script performs the following steps:
- Creates a "scan-reports" folder to store the scan reports.
- Reads the manifest.yaml file containing the list of Docker images.
- Parses the YAML content and extracts the list of saved images.
- Iterates over each image and performs the following actions:
- Checks if the Docker image already exists locally.
- If the image does not exist locally, pulls the image.
- Performs a Trivy scan on the image.
- Stores the Trivy scan report in a separate file.
-
Ensure you have Docker and Trivy installed on your system.
-
Make sure to provide a correct
manifest.yaml
, place it at the root of the project. -
Open a terminal and navigate to the root directory of the project.
-
Run the following command to execute the script:
make run-scanner