This project is based on doing in a standard way using docker to use the trivy image vulnerability scanner, which allows checking Docker images and some aspects for images for kubernetes.
- Trivy: It is based on trivy.
- Docker: It is required to have docker installed.
- Docker Compose: It is required to have docker compose installed.
git clone git@github.com:gbolivar/scan-trivy.gitcd scan-trivyOnce the repository is cloned, the first thing is to generate the docker images:
docker-compose up -d --buildScan an image in python with alpine
docker-compose exec scan-trivy trivy image python:3.4-alpineYou can scan the packets of an image:
docker-compose exec scan-trivy trivy image --pkg-types os ruby:2.4.0Can scan packets for the most critical vulnerabilities with the highest priority:
docker-compose exec scan-trivy trivy image --severity HIGH python:3.4-alpineThen go into the backend container:
docker exec -it scan-trivy /bin/bashTo exit the container, use the exit command:
exitThen you may want to delete the entire project container and leave it clean.:
docker-compose downCreate for Gregorio José Bolívar Bolívar
Anything you need let me know so I can help you. 💬.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.