Skip to content

Instantly share code, notes, and snippets.

@niusmallnan
Last active March 16, 2023 05:24
Show Gist options
  • Save niusmallnan/5bc642212c2b368dedaedd632c1f6ae2 to your computer and use it in GitHub Desktop.
Save niusmallnan/5bc642212c2b368dedaedd632c1f6ae2 to your computer and use it in GitHub Desktop.
Trivy Tips

Scan images list

docker run -it --entrypoint /bin/sh -v $HOME/.trivy_cache:/root/.cache -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy

cat images.txt | xargs -P 0 -I % trivy image --no-progress --ignore-unfixed --severity HIGH,CRITICAL -q --scanners vuln %

Scan an image via docker


docker run -v $HOME/.trivy_cache:/root/.cache -v /var/run/docker.sock:/var/run/docker.sock --rm aquasec/trivy image --no-progress --ignore-unfixed --severity HIGH,CRITICAL --scanners vuln --exit-code 1 busybox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment