adding the packages section to the report to bridgecrew
@@ -48,6 +48,15 @@ class DockerImageScanningIntegration(TwistcliIntegration):
}
for vul in twistcli_scan_result["results"][0].get("vulnerabilities") or []
]
+ packages = [
+ {
+ "type": package.get("type"),
+ "name": package.get("name"),
+ "version": package.get("version"),
+ "licenses": package.get("licenses") or [],
+ }
+ for package in twistcli_scan_result["results"][0].get("packages") or []
+ ]
payload = {
"dockerImageName": docker_image_name,
"dockerFilePath": removeprefix(str(file_path), os.getenv("BC_ROOT_DIR", "")),
@@ -57,6 +66,7 @@ class DockerImageScanningIntegration(TwistcliIntegration):
"branch": bc_integration.repo_branch,
"sourceType": bc_integration.bc_source.name,
"vulnerabilities": vulnerabilities,
+ "packages": packages,
}
if bc_integration.cicd_details:
payload["cicd_details"] = bc_integration.cicd_details
