Added Preprocessing Script for Wazuh API and Modified Wazuh Parser#8746
Conversation
1. Introduced wazuh-vulns-extractor.py to preprocess and improve Wazuh reporting.\n2. Modified the Wazuh parser to support endpoint creation based on agent_ip, enabling multi-agent support and better vulnerability-to-host correlation.
1. Introduced wazuh-vulns-extractor.py to preprocess and improve Wazuh reporting.\n2. Modified the Wazuh parser to support endpoint creation based on agent_ip, enabling multi-agent support and better vulnerability-to-host correlation.
1. Introduced wazuh-vulns-extractor.py to preprocess and improve Wazuh reporting.\n2. Modified the Wazuh parser to support endpoint creation based on agent_ip, enabling multi-agent support and better vulnerability-to-host correlation.
1. Introduced wazuh-vulns-extractor.py to preprocess and improve Wazuh reporting.\n2. Modified the Wazuh parser to support endpoint creation based on agent_ip, enabling multi-agent support and better vulnerability-to-host correlation.
1. Introduced wazuh-vulns-extractor.py to preprocess and improve Wazuh reporting.\n2. Modified the Wazuh parser to support endpoint creation based on agent_ip, enabling multi-agent support and better vulnerability-to-host correlation.
|
@vd0n any thoughts about adding |
This should remain optional. Anyone can set |
|
Parsers, where DefectDojo approaches some tool's API, are implemented differently. They use models like Please find inspiration in parsers starting with |
|
As API importer caused some issues in the past and are also not wished until v3 I guess this way is a good approach to go. It should be implemented as API importer in the future (v3 ongoing) but not for now. |
quirinziessler
left a comment
There was a problem hiding this comment.
I tested various upload cases and found some issues with the deduplication (see recommendations). If you integrate those and change the deduplication in settings.dist.py to Unique_id_from_tool everything works fine.
manuel-sommer
left a comment
There was a problem hiding this comment.
Hi @vd0n,
It would be nice if you could extend the unittests for this PR.
|
While this is a interesting PR, we can't accept API integrations while we're working on the v3 updates - details in this GH discussion: #8974 Additionally, API integrations are very hard to test with GH actions unless we run instances of all the APIs we integration with (or have accounts with commercial vendors). Since you can obviously write code, until we get the product parent/child thing figured out and rev to version 3, this would be best implemented as an external service and called via a cron job or similar. Thanks for the work but the timing just isn't right. |
We are narrowing the scope of acceptable enhancements to DefectDojo in preparation for v3. Learn more here:
https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md
Description
This PR introduces the
wazuh-vulns-extractor.pyscript, designed to enhance vulnerability reporting from Wazuh. This script ensures precise targeting by intersecting two specific agent groups and appends an 'agent_ip' field for every vulnerability. The updatedparser.pyutilizes this data, enabling DefectDojo to create endpoints and effectively correlate each vulnerability to a specific agent, streamlining traceability and accountability.Test results
Checklist
dev.dev.bugfixbranch.Extra information
Moderators: Kindly add the labels:
Contributors: Git Tips
Rebase on dev branch
If the dev branch has changed since you started working on it, please rebase your work after the current dev.
On your working branch
mybranch:In case of conflict:
When everything's fine on your local branch, force push to your
myOriginremote:To cancel everything:
Squashing commits
pickbyfixupon the commits you want squashed outpickbyrewordon the first commit if you want to change the commit messageForce push to your
myOriginremote: