fix(sca): fixing integration tests
fixing integration tests
@@ -38,11 +38,11 @@ class Runner(BaseRunner[None]):
# skip complete run, if flag '--check' was used without a CVE check ID or the license policies
if not should_run_scan(runner_filter.checks):
- return None
+ return []
if not bc_integration.bc_api_key:
logging.info("The --bc-api-key flag needs to be set to run SCA package scanning")
- return None
+ return []
logging.info("SCA package scanning searching for scannable files")
@@ -61,12 +61,14 @@ class Runner(BaseRunner[None]):
)
if not input_paths:
# no packages found
- return None
+ return []
logging.info(f"SCA package scanning will scan {len(input_paths)} files")
scanner = Scanner(self.pbar, root_folder)
self._check_class = f"{scanner.__module__}.{scanner.__class__.__qualname__}"
+
+ # it will be None in case of unexpected failure during the scanning
scan_results: Sequence[dict[str, Any]] | None = scanner.scan(input_paths)
if scan_results is not None:
logging.info(f"SCA package scanning successfully scanned {len(scan_results)} files")
