fix(sdk): allow Trivy DB download in Image provider connection test

- Remove invalid --scanners none flag
- Let Trivy download vulnerability DB on first run
This commit is contained in:
Andoni A. committed 2026-02-19 17:31:12 +01:00
1 parent 30533d9a29
commit 6d1ee5e6d0
1 file changed
+7 -4
+7 -4
View File
@@ -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,
)