diff --git a/cve_bin_tool/parsers/__init__.py b/cve_bin_tool/parsers/__init__.py index c44ebe8420..843b210fb1 100644 --- a/cve_bin_tool/parsers/__init__.py +++ b/cve_bin_tool/parsers/__init__.py @@ -118,11 +118,17 @@ def find_vendor_from_purl(self, purl, ver) -> Tuple[List[ScanInfo], bool]: vendors.add((vendor, product)) else: return vendorlist, False - + purl_with_ver = f"{str(purl)}@{ver}" for vendor, product in vendors: vendorlist.append( ScanInfo( - ProductInfo(vendor, product, ver, "/usr/local/bin/product"), + ProductInfo( + vendor, + product, + ver, + "/usr/local/bin/product", + purl=purl_with_ver, + ), self.filename, ) ) diff --git a/cve_bin_tool/util.py b/cve_bin_tool/util.py index 6c9d5b247c..21ce7ccc22 100644 --- a/cve_bin_tool/util.py +++ b/cve_bin_tool/util.py @@ -155,12 +155,14 @@ class ProductInfo(NamedTuple): product: str version: str location: str + purl: Optional[str] """ vendor: str product: str version: str location: str + purl: str | None = None class ScanInfo(NamedTuple):