Update docker/trivy/start.sh
This commit is contained in:
parent
2e3fe96d53
commit
c5cf561c1e
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
TIMEOUT=${TIMEOUT:-120m}
|
TIMEOUT=${TIMEOUT:-120m}
|
||||||
SCANNERS=("vuln" "config" "secret")
|
|
||||||
IGNORE_UNFIXED=${IGNORE_UNFIXED:-false}
|
IGNORE_UNFIXED=${IGNORE_UNFIXED:-false}
|
||||||
LOW_PRIORITY=${LOW_PRIORITY:-true}
|
LOW_PRIORITY=${LOW_PRIORITY:-true}
|
||||||
|
|
||||||
|
# Use SCANNERS_ENV if provided, otherwise default to vuln, config, secret
|
||||||
|
if [ -n "$SCANNERS_ENV" ]; then
|
||||||
|
IFS=',' read -r -a SCANNERS <<< "$SCANNERS_ENV"
|
||||||
|
else
|
||||||
|
SCANNERS=("vuln" "config" "secret")
|
||||||
|
fi
|
||||||
|
|
||||||
run_scan() {
|
run_scan() {
|
||||||
for SCANNER in "${SCANNERS[@]}"; do
|
for SCANNER in "${SCANNERS[@]}"; do
|
||||||
CURRENT_LOG="/log/trivy_scan_${SCANNER}.log"
|
CURRENT_LOG="/log/trivy_scan_${SCANNER}.log"
|
||||||
|
|
Loading…
Reference in New Issue