Refactor Trivy integration: update report generation scripts, enhance email dispatch logic, and remove obsolete test file

This commit is contained in:
2025-09-22 19:23:45 +02:00
parent 1e8526f442
commit 4d00986273
5 changed files with 53 additions and 394 deletions
@@ -0,0 +1,15 @@
#!/usr/bin/env sh
set -euo pipefail
export HOME="/tmp"
TRIVY_CACHE_DIR="/tmp/cache"
mkdir -p /tmp/.trivy
mkdir -p ${TRIVY_CACHE_DIR}
trivy plugin install scan2html
trivy k8s --report=${REPORT_TYPE:-all} \
--exit-code=0 \
--severity=${LEVELS:-CRITICAL,HIGH,MEDIUM} \
-o tmp/trivy.json \
--format json \
--disable-node-collector \
--parallel ${PARALLEL:-5}
trivy scan2html generate --scan2html-flags --output tmp/report.html --from tmp/trivy.json