Update docker/trivy/start.sh

This commit is contained in:
colin 2024-01-20 21:29:43 +00:00
parent c5cf561c1e
commit e57389ec37
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ 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"
OLD_IFS="$IFS"
IFS=',' read -r -a SCANNERS <<EOF
$SCANNERS_ENV
EOF
IFS="$OLD_IFS"
else
SCANNERS=("vuln" "config" "secret")
fi