5. Perform Vulnerability Assessment on Docker Images
By leveraging tools like Trivy, you can analyze Docker images, identifying and exploiting vulnerabilities
1. Vulnerability Assessment on Docker Images using Trivy
Trivy is a powerful security scanner that detects vulnerabilities and misconfigurations across a wide range of targets, including container images, file systems, Git repositories, virtual machine images, Kubernetes, and AWS. With its comprehensive scanners, Trivy identifies OS package vulnerabilities, sensitive information, IaC issues, and more, providing a robust security solution for your infrastructure.
In this lab we will be scanning two docker images, first the secure one and second the vulnerable one
docker pull ubuntu
Once the image is pulled we will be performing vulnerability assessment. Execute command trivy image ubuntu.
trivy image ubuntu

We can observe that we have total 0 vulnerability and it's completely secure.
Now, let us pull a vulnerable image.
docker pull nginx:1.19.6
Execute command.
trivy image nginx:1.19.6

We can see that we have total 401 vulnerabilities which is categorized as well along with CVEs mentioned.
Last updated
Was this helpful?