File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,12 +142,10 @@ if [ "${CI:-}" = "true" ] || [ "${GITHUB_ACTIONS:-}" = "true" ]; then
142142 unirtm exec -- trivy fs --format cyclonedx --output sbom.json .
143143 unirtm exec -- trivy sbom sbom.json
144144else
145+ unirtm exec -- trivy fs --format cyclonedx --output sbom.json .
145146 # Try offline mode first. If missing DB, it will fail and we fallback to online.
146- if unirtm exec -- trivy fs --skip-db-update --skip-java-db-update --skip-check-update --offline-scan --format cyclonedx --output sbom.json . >/dev/null 2>&1; then
147- unirtm exec -- trivy sbom --skip-db-update --skip-java-db-update --offline-scan sbom.json
148- else
147+ if ! unirtm exec -- trivy sbom --skip-db-update --skip-java-db-update --offline-scan sbom.json; then
149148 echo "⚠️ Local Trivy DB missing. Downloading from AWS ECR fallback..."
150- unirtm exec -- trivy fs --format cyclonedx --output sbom.json .
151149 unirtm exec -- trivy sbom sbom.json
152150 fi
153151fi
You can’t perform that action at this time.
0 commit comments