Qualys parser add CVEs to Vulnerability Ids for xml files#13710
Merged
rossops merged 3 commits intoDefectDojo:bugfixfrom Nov 17, 2025
Merged
Qualys parser add CVEs to Vulnerability Ids for xml files#13710rossops merged 3 commits intoDefectDojo:bugfixfrom
rossops merged 3 commits intoDefectDojo:bugfixfrom
Conversation
Maffooch
approved these changes
Nov 14, 2025
Comment on lines
+316
to
+331
| temp_cve_details = list(vuln_item.iterfind("CVE_ID_LIST/CVE_ID")) | ||
| if temp_cve_details: | ||
| cl = { | ||
| cve_detail.findtext("ID"): cve_detail.findtext("URL") | ||
| for cve_detail in temp_cve_details | ||
| } | ||
| temp["cve"] = "\n".join(list(cl.keys())) | ||
| temp["links"] = "\n".join(list(cl.values())) | ||
| cve_list = [] | ||
| link_list = [] | ||
| for cve_detail in temp_cve_details: | ||
| cve_id = cve_detail.findtext("ID") | ||
| cve_url = cve_detail.findtext("URL") | ||
| if cve_id: | ||
| cve_list.append(cve_id) | ||
| if cve_url: | ||
| link_list.append(cve_url) | ||
|
|
||
| temp["cve_list"] = cve_list # list of CVE strings | ||
| temp["links"] = "\n".join(link_list) | ||
| else: | ||
| temp["cve_list"] = [] |
Member
There was a problem hiding this comment.
Nice improvement to the parser. It doesn't intefere with dedupe as the vulnerability_ids are not part of the hash_code config.
Maybe nitpicking, but the (pre-existing) temp variable name feels a bit weird, could it just be cve_details?
If you want you can also simplify to the code using some python list features:
cve_data = [(cve.findtext("ID"), cve.findtext("URL"))
for cve in vuln_item.iterfind("CVE_ID_LIST/CVE_ID")]
cve_list = [cve_id for cve_id, _ in cve_data if cve_id]
link_list = [url for _, url in cve_data if url]
blakeaowens
approved these changes
Nov 16, 2025
…or improved readability
valentijnscholten
approved these changes
Nov 17, 2025
rossops
approved these changes
Nov 17, 2025
Maffooch
pushed a commit
to valentijnscholten/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
Qualys parser add CVEs to Vulnerability Ids for xml files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[sc-12089]
While testing I discovered that the CSV parser already parses the CVE values into Vulnerabilty Ids so I only made changes to the xml parser.
PR Still needs Unittests