OpenVAS Parser - parsing and deduplication improvments#12920
OpenVAS Parser - parsing and deduplication improvments#12920jostaub wants to merge 15 commits intoDefectDojo:devfrom
Conversation
| "Qualys Hacker Guardian Scan": ["title", "severity", "description"], | ||
| "Cyberwatch scan (Galeax)": ["title", "description", "severity"], | ||
| "Cycognito Scan": ["title", "severity"], | ||
| "OpenVAS Parser v2": ["title", "unique_id_from_tool", "vuln_id_from_tool"], |
There was a problem hiding this comment.
unique_id_from_tool should not be in here, you should set DEDUPLICATION_ALGORITHM_PER_PARSER to DEDUPE_ALGO_UNIQUE_ID_FROM_TOOL_OR_HASH_CODE for this v2 parser.
There was a problem hiding this comment.
see my reply to your comment.
Using the port could work, but I don't see where you're using it? The |
For better context: Currently, it solves the following two things for me:
However, these points could be solved differently. For example, for point 1, it would be possible to add a new field to the finding model for organization-specific severity. For point 2, it could be solved by changing the hash implementation to allow de-duplication on the endpoint port. However, this would require a few more changes to work reliably. To move this PR forward, I will disregard these points for now in favor of an implementation that conforms better to current standards and de duplication on endpoints. |
|
Do you have a better idea for what to call the v2 version? Following the current naming scheme, the test would be called "test_openvas_v2_parser.py." However, this looks misleading since it's a v2 of the parser, not OpenVAS. I have a similar confusion problem with the Parser Class since it needs to end in Parser to be read by algo that loads the parsers. Would a PR to change these behaviors be accepted? |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
456a0b2 to
0696385
Compare
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
I will create a new, more concise pull request to improve the review experience. Also, I still find things that need changing, and I don't want to waste more CI time. |
This changed updates the OpenVAS Parser to fix the issues described in #12378. This PR was initially planned as an update the the existing parser. However after all the changes and possible problems for user we decided to move the changes into a v2 version of the parser (see linked issue).
Detailed changes:
General:
CSV Parser:
XML Parser:
TODOs:
[x] extract more information from xml
~~[] migration for OpenVAS parser ~~
[x] improve testing with better test files
Open Questions: