Skip to content

Commit 05dae4e

Browse files
authored
fix(iac): handle empty results (#8733)
1 parent 52ddaca commit 05dae4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prowler/providers/iac/iac_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def run_scan(
350350
logger.info(f"{line}")
351351

352352
try:
353-
output = json.loads(process.stdout)["Results"]
353+
output = json.loads(process.stdout).get("Results", [])
354354

355355
if not output:
356356
logger.warning("No findings returned from Trivy scan")

0 commit comments

Comments
 (0)