Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dojo/tools/wazuh/v4_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ def parse_findings(self, test, data):
agent_ip = item.get("agent_ip")
detection_time = item.get("detection_time").split("T")[0]

# Map Wazuh severity to its equivalent in DefectDojo
SEVERITY_MAP = {
"Critical": "Critical",
"High": "High",
"Medium": "Medium",
"Low": "Low",
"Info": "Info",
"Informational": "Info",
"Untriaged": "Info",
}
# Get DefectDojo severity and default to "Info" if severity is not in the mapping
severity = SEVERITY_MAP.get(severity, "Info")

references = "\n".join(links) if links else None

title = (
Expand Down
13 changes: 13 additions & 0 deletions dojo/tools/wazuh/v4_8.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ def parse_findings(self, test, data):
detection_time = vuln.get("detected_at").split("T")[0]
references = vuln.get("reference")

# Map Wazuh severity to its equivalent in DefectDojo
SEVERITY_MAP = {
"Critical": "Critical",
"High": "High",
"Medium": "Medium",
"Low": "Low",
"Info": "Info",
"Informational": "Info",
"Untriaged": "Info",
}
# Get DefectDojo severity and default to "Info" if severity is not in the mapping
severity = SEVERITY_MAP.get(severity, "Info")

title = (
cve + " affects (version: " + item.get("package").get("version") + ")"
)
Expand Down