Refactor Trivy integration: update report generation scripts, enhance email dispatch logic, and remove obsolete test file
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user