diff --git a/bin/trivy-image-scan.bash b/bin/trivy-image-scan.bash index 32bdde8..6eff6a0 100755 --- a/bin/trivy-image-scan.bash +++ b/bin/trivy-image-scan.bash @@ -37,6 +37,7 @@ docker run \ "${TRIVY_IMG}" \ image \ --config "/repo/configs/${config}" \ + --ignorefile /repo/configs/.trivyignore \ --format table \ --output /reports/trivy-cve.txt \ "${image}" @@ -51,6 +52,7 @@ docker run \ "${TRIVY_IMG}" \ image \ --config "/repo/configs/${config}" \ + --ignorefile /repo/configs/.trivyignore \ --format cyclonedx \ --output /reports/trivy-sbom.json \ "${image}" diff --git a/bin/trivy-misconfig-dockerfile.bash b/bin/trivy-misconfig-dockerfile.bash index d0e4744..d8426e9 100755 --- a/bin/trivy-misconfig-dockerfile.bash +++ b/bin/trivy-misconfig-dockerfile.bash @@ -27,5 +27,6 @@ docker run \ ghcr.io/aquasecurity/trivy:latest \ config \ --config "/repo/configs/${config}" \ + --ignorefile /repo/configs/.trivyignore \ "/repo/${dockerfile}" diff --git a/configs/.trivyignore b/configs/.trivyignore new file mode 100644 index 0000000..28a8e11 --- /dev/null +++ b/configs/.trivyignore @@ -0,0 +1 @@ +AVD-DS-0002 # Image user should not be root