mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-12 14:34:16 +00:00
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:
1 file changed
+7
-4
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user