Skip to content

Commit

Permalink
Increased timeout and skip Java DB download
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Sep 25, 2024
1 parent 4137e88 commit 8ddafe8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/scripts/security_scan/run_trivy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ curl -o "$HOME/.cache/trivy/java-db/trivy-java.db" "${TRIVY_CACHE_LOCATION}/jav

output_path=$1

trivy rootfs --no-progress --offline-scan --format json --skip-db-update --ignore-policy /trivy.rego --output "$output_path/trivy_report.json" / > /dev/null
trivy rootfs --no-progress --offline-scan --format json --timeout 15m0s --skip-java-db-update --skip-db-update --ignore-policy /trivy.rego --output "$output_path/trivy_report.json" / > /dev/null
#run with format table and print to stdout
trivy rootfs --no-progress --offline-scan --format table --skip-db-update --ignore-policy /trivy.rego --output "$output_path/trivy_report.txt" / > /dev/null
trivy rootfs --no-progress --offline-scan --format table --timeout 15m0s --skip-java-db-update --skip-db-update --ignore-policy /trivy.rego --output "$output_path/trivy_report.txt" / > /dev/null
#Force script to return with error if a high or critical issue is found
trivy rootfs --no-progress --offline-scan --skip-db-update --ignore-policy /trivy.rego --show-suppressed --severity "HIGH,CRITICAL" --exit-code 1 /
trivy rootfs --no-progress --offline-scan --timeout 15m0s --skip-db-update --skip-java-db-update --ignore-policy /trivy.rego --show-suppressed --severity "HIGH,CRITICAL" --exit-code 1 /

0 comments on commit 8ddafe8

Please sign in to comment.