@@ -62,7 +62,7 @@ def __init__(
6262 self .products_without_cve = 0
6363 self .all_cve_data = defaultdict (lambda : {"cves" : [], "paths" : set ()})
6464 self .all_cve_version_info = dict ()
65- self .all_product_data = dict ( )
65+ self .all_product_data = defaultdict ( lambda : { "cves_total" : 0 , "paths" : set ()} )
6666
6767 def get_cves (self , product_info : ProductInfo , triage_data : TriageData ):
6868 """Get CVEs against a specific version of a product.
@@ -81,22 +81,23 @@ def get_cves(self, product_info: ProductInfo, triage_data: TriageData):
8181 # In no-scan mode, just populate the product data without CVE scanning
8282 if product_info not in self .all_product_data :
8383 self .logger .debug (f"Add product { product_info } (no-scan mode)" )
84- self .all_product_data [product_info ] = 0
84+ self .all_product_data [product_info ][ "cves_total" ] = 0
8585
8686 # Also populate all_cve_data with empty CVE list and paths
8787 if product_info not in self .all_cve_data :
8888 self .all_cve_data [product_info ] = {"cves" : [], "paths" : set ()}
8989
9090 # Update paths
9191 self .all_cve_data [product_info ]["paths" ] |= set (triage_data ["paths" ])
92+ self .all_product_data [product_info ]["paths" ] |= set (triage_data ["paths" ])
9293 return
9394
9495 if product_info .vendor == "UNKNOWN" :
9596 # Add product
9697 if product_info not in self .all_product_data :
9798 self .logger .debug (f"Add product { product_info } " )
9899 # Number of CVEs is 0
99- self .all_product_data [product_info ] = 0
100+ self .all_product_data [product_info ][ "cves_total" ] = 0
100101 return
101102
102103 if product_info in self .all_cve_data :
@@ -396,7 +397,10 @@ def get_cves(self, product_info: ProductInfo, triage_data: TriageData):
396397 )
397398
398399 if product_info not in self .all_product_data :
399- self .all_product_data [product_info ] = len (cves )
400+ self .all_product_data [product_info ]["cves_total" ] = len (cves )
401+
402+ # Update paths
403+ self .all_product_data [product_info ]["paths" ] |= set (triage_data ["paths" ])
400404
401405 def filter_triage_data (self ):
402406 """
0 commit comments