Files

16 lines
601 B
Bash
Raw Permalink Normal View History

#!/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} \
--scanners ${SCANNERS:-vuln,misconfig} \
-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