Please Note: This article is part of our historical archive. Because it was published a while ago, some of the information, links, or context may now be outdated.
Willing to know about docker image vulnerability scanning tools? We can help you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Docker Hosting Support.
Let’s take a look at how our Support Team is ready to help customers with Docker query.
Docker image vulnerability scanning tools
There are many open-source code tools for Docker vulnerability scanning.
Today, let us discuss about the tools listed by our Support techs.
Docker Bench for Security
First and foremost, this security tool is based on CIS Docker Benchmarks for all automated scans.
Scans can perform with a docker image or a shell script.
Scan results include vulnerabilities related to the host configuration, docker daemon configuration and files.
By using this tool, you will check if you have applied best practices on your docker images and you will be able to get action-related warnings.
The coding below shows how to install all related packages and Docker Bench for Security on Ubuntu 20.04:
Next, Amazon ECR is a service that manages container registries for storing, managing, and deploying container images.
If you’re managing your user docker images with AWS ECR, you can scan your images that help to improve the security of your application’s container images.
Additionally, you can enable the “scans on push” feature for your repositories to ensure every image automatically goes through a vulnerability scanning.
AWS ECR uses CVE databases for findings. To enable scan on push feature:
After pushing your docker images to the cloud, you could see your scan results on the AWS console in detail.
After you get results, you can fix vulnerabilities with security updates.
Trivy
Finally, Trivy is an open-source vulnerability scanner for your docker images announced by Aqua Security.
In addition to docker images, Trivy can scan your filesystems and git repositories for you.
It can detect vulnerabilities in minutes and be suitable for CI & CD processes. Trivy can install in many Linux distributions easily.
It lists vulnerabilities and related libraries with detailed information such as installed library version on the docker, the fixed version that should installed, severity level, etc.
To install all related packages and Docker Bench for Security on Ubuntu 20.04:
$ sudo apt-get install wget apt-transport-https gnupg lsb-release
$ wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
$ echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
$ sudo apt-get update
$ sudo apt-get install trivy