Use the packages key, not the vulnerabilities key
@@ -57,7 +57,7 @@ class Scanner:
else:
scan_results: List[Dict[str, Any]] = await asyncio.gather(*[self.run_scan(i) for i in input_paths])
- if any(scan_result["vulnerabilities"] is None for scan_result in scan_results):
+ if any(scan_result["packages"] is None for scan_result in scan_results):
image_scanner.setup_twistcli()
if os.getenv("PYCHARM_HOSTED") == "1":
@@ -65,14 +65,14 @@ class Scanner:
# it avoids us from crashing, which happens when using multiprocessing via Pycharm's debug-mode
logging.warning("Running the scans in sequence for avoiding crashing when running via Pycharm")
scan_results = [
- await self.execute_twistcli_scan(input_path) if scan_results[idx]["vulnerabilities"] is None else
+ await self.execute_twistcli_scan(input_path) if scan_results[idx]["packages"] is None else
scan_results[idx] for idx, input_path in enumerate(input_paths)
]
else:
indices_to_fix: List[int] = []
input_paths_as_list: List[Path] = list(input_paths) # create a list from a set ("Iterable")
for idx, input_path in enumerate(input_paths_as_list):
- if scan_results[idx]["vulnerabilities"] is None:
+ if scan_results[idx]["packages"] is None:
indices_to_fix.append(idx)
new_scan_results = await asyncio.gather(*[
self.execute_twistcli_scan(input_paths_as_list[idx]) for idx in indices_to_fix
