From 6d1ee5e6d0c01252e5482d9a581ed8a5ef3071d7 Mon Sep 17 00:00:00 2001 From: "Andoni A." <14891798+andoniaf@users.noreply.github.com> Date: Thu, 19 Feb 2026 17:31:12 +0100 Subject: [PATCH] fix(sdk): allow Trivy DB download in Image provider connection test - Remove invalid --scanners none flag - Let Trivy download vulnerability DB on first run --- prowler/providers/image/image_provider.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/prowler/providers/image/image_provider.py b/prowler/providers/image/image_provider.py index 38ef07a9b0..da5fac5604 100644 --- a/prowler/providers/image/image_provider.py +++ b/prowler/providers/image/image_provider.py @@ -929,18 +929,21 @@ class ImageProvider(Provider): elif registry_token: env["TRIVY_REGISTRY_TOKEN"] = registry_token - # Test by pulling image metadata without scanning (no DB required) + # Test by scanning the image with a short timeout; Trivy will + # download the vulnerability DB on the first run if needed. process = subprocess.run( [ "trivy", "image", - "--scanners", - "none", + "--format", + "json", + "--timeout", + "5m", image, ], capture_output=True, text=True, - timeout=60, + timeout=360, env=env, )