File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,24 +311,10 @@ def parse_finding(host, tree):
311311 split_cvss (cvss2 , temp )
312312 # DefectDojo does not support cvssv2
313313 temp ["CVSS_vector" ] = None
314-
315314 # CVE and LINKS
316- temp_cve_details = list (vuln_item .iterfind ("CVE_ID_LIST/CVE_ID" ))
317- if temp_cve_details :
318- cve_list = []
319- link_list = []
320- for cve_detail in temp_cve_details :
321- cve_id = cve_detail .findtext ("ID" )
322- cve_url = cve_detail .findtext ("URL" )
323- if cve_id :
324- cve_list .append (cve_id )
325- if cve_url :
326- link_list .append (cve_url )
327-
328- temp ["cve_list" ] = cve_list # list of CVE strings
329- temp ["links" ] = "\n " .join (link_list )
330- else :
331- temp ["cve_list" ] = []
315+ temp_cve_details = [(cve .findtext ("ID" ), cve .findtext ("URL" )) for cve in vuln_item .iterfind ("CVE_ID_LIST/CVE_ID" )]
316+ temp ["cve_list" ] = [cve_id for cve_id , _ in temp_cve_details if cve_id ]
317+ temp ["links" ] = [url for _ , url in temp_cve_details if url ]
332318
333319 # Generate severity from number in XML's 'SEVERITY' field, if not present default to 'Informational'
334320 sev = get_severity (vuln_item .findtext ("SEVERITY" ))
You can’t perform that action at this time.
0 commit comments