fix: use memory cache backend for parallel trivy scans
Parallel trivy image workers sharing the fs cache directory hit "cache may be in use by another process: timeout" errors. Switch to --cache-backend memory to avoid bolt-db lock contention, matching the approach already used in generate-sbom.sh.
This commit is contained in:
@@ -103,7 +103,7 @@ jobs:
|
||||
img="$1"; reports="$2"
|
||||
safe=$(printf "%s" "$img" | tr "/:@" "___")
|
||||
echo ">> 스캔: $img"
|
||||
trivy image --quiet --skip-db-update \
|
||||
trivy image --quiet --cache-backend memory --skip-db-update \
|
||||
--format json --timeout 15m --output "$reports/$safe.json" "$img" \
|
||||
|| echo "::warning::스캔 실패: $img"
|
||||
' _ {} "$REPORTS_DIR" < "$OUT_DIR/images_scan.txt"
|
||||
|
||||
Reference in New Issue
Block a user