return result files list for iac bom print
@@ -252,10 +252,17 @@ class RunnerRegistry:
exit_code = 1 if 1 in exit_codes else 0
return cast(Literal[0, 1], exit_code)
- def print_iac_bom_reports(self, output_path: str, scan_reports: list[Report], output_types: list[str]) -> None:
+ def print_iac_bom_reports(self, output_path: str,
+ scan_reports: list[Report],
+ output_types: list[str]) -> dict[str, str]:
# create cyclonedx report
+ output_files = {
+ 'cyclonedx': 'results_cyclonedx.xml',
+ 'csv': 'results_iac.csv'
+ }
+
if 'cyclonedx' in output_types:
- cyclonedx_output_path = 'results_cyclonedx.xml'
+ cyclonedx_output_path = output_files['cyclonedx']
cyclonedx = CycloneDX(reports=scan_reports,
repo_id=metadata_integration.bc_integration.repo_id,
export_iac_only=True)
@@ -270,7 +277,9 @@ class RunnerRegistry:
for report in scan_reports:
if not report.is_empty():
csv_sbom_report.add_report(report=report, git_org="", git_repository="")
- csv_sbom_report.persist_report_iac(file_name='results_iac.csv', output_path=output_path)
+ csv_sbom_report.persist_report_iac(file_name=output_files['csv'], output_path=output_path)
+
+ return output_files
def filter_runner_framework(self) -> None:
if not self.runner_filter:
