added packages to twistcli report
@@ -33,6 +33,15 @@ class PackageScanningIntegration(TwistcliIntegration):
}
for vul in twistcli_scan_result.get("vulnerabilities") or []
]
+ packages = [
+ {
+ "type": package.get("type"),
+ "name": package.get("name"),
+ "version": package.get("version"),
+ "licenses": package.get("licenses", [])
+ }
+ for package in twistcli_scan_result.get("packages") or []
+ ]
payload = {
"packageName": str(file_path.name),
"packageFilePath": removeprefix(str(file_path), os.getenv("BC_ROOT_DIR", "")),
@@ -41,6 +50,7 @@ class PackageScanningIntegration(TwistcliIntegration):
"branch": bc_platform_integration.repo_branch,
"sourceType": bc_platform_integration.bc_source.name,
"vulnerabilities": vulnerabilities,
+ "packages": packages,
}
return payload
