Skip to content

Commit 13e35cf

Browse files
authored
Updated Nexpose XML (Rapid7) Parser Documentation (#12409)
Update Nexpose XML (Rapid7) Parser documentation including Field Mapping Details, Special Processing Notes, Conversion details, and links.
1 parent 409af5f commit 13e35cf

File tree

1 file changed

+104
-2
lines changed
  • docs/content/en/connecting_your_tools/parsers/file

1 file changed

+104
-2
lines changed

docs/content/en/connecting_your_tools/parsers/file/nexpose.md

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,109 @@
22
title: "Nexpose XML 2.0 (Rapid7)"
33
toc_hide: true
44
---
5-
Use the full XML export template from Nexpose.
5+
6+
# Nexpose XML 2.0 (Rapid7) Parser Documentation
7+
8+
## Overview
9+
10+
The Nexpose XML 2.0 (Rapid7) parser for DefectDojo supports importing vulnerability scan results from Rapid7's Nexpose vulnerability scanner. This parser processes XML reports containing detailed information about vulnerabilities detected across hosts and services in your environment.
11+
12+
## Supported File Types
13+
14+
The Nexpose parser accepts XML 2.0 file format. To generate this file:
15+
16+
1. In the Nexpose console, go to the Reports section
17+
2. Create a new report or edit an existing one
18+
3. Select "XML Export" as the report format
19+
4. Ensure you select "XML 2.0" as the version
20+
5. Run the report and download the XML file
21+
22+
## XML Format
23+
24+
### Total Fields in Nexpose XML
25+
26+
- Total data fields in Nexpose XML: 25 primary elements with nested structures
27+
- Total data fields parsed into DefectDojo finding: 18 key fields mapped
28+
- Total data fields NOT parsed: 7 (including metadata fields not relevant to findings)
29+
30+
### Field Mapping Details
31+
32+
| Data Field # | Nexpose Data Field | DefectDojo Finding Field | Parser Line # | Notes |
33+
|--------------|------------|---------------|---------------|-------|
34+
| 1 | vulnerability.title | title | 323 | Direct mapping to finding title |
35+
| 2 | vulnerability.description | description | 324-325 | Converted from HTML to text |
36+
| 3 | vulnerability.severity | severity | 316-320 | Converted from numeric (0-10) to text severity |
37+
| 4 | test.status | active | 321 | Only vulnerable statuses are processed |
38+
| 5 | vulnerability.cvssVector | impact | 329 | The CVSS vector string is mapped to impact |
39+
| 6 | vulnerability.solution | mitigation | 326-328 | HTML converted to text if present |
40+
| 7 | test.pluginOutput | description | 334-339 | Test output appended to description |
41+
| 8 | vulnerability.references | references | 354-370 | Special formatting applied to different reference types |
42+
| 9 | vulnerability.references.CVE | unsaved_vulnerability_ids | 371-372 | CVE references are added to vulnerability IDs list |
43+
| 10 | vulnerability.tags | unsaved_tags | 347 | Tags are collected and mapped to unsaved_tags |
44+
| 11 | node.address | endpoint.host | 295 | Used to create endpoint objects |
45+
| 12 | node.names.name | endpoint.host | 295 | Hostnames are collected as alternatives to IP addresses |
46+
| 13 | service.name | endpoint.protocol | 302-307 | Used if service name matches a known protocol |
47+
| 14 | service.port | endpoint.port | 297 | Added to endpoint if present |
48+
| 15 | service.protocol | endpoint.protocol | 302-307 | Used as fallback protocol if service name doesn't match |
49+
| 16 | test.vulnerable-since | date | 341-345 | Used for finding date if USE_FIRST_SEEN is enabled |
50+
| 17 | node.hostnames | endpoint.host | 272-274 | Hostnames associated with the node are added to a set |
51+
| 18 | test.pci-compliance-status | Not directly mapped | 293 | Used in filtering but not mapped to a field |
52+
53+
### Special Processing Notes
54+
55+
#### Status Conversion
56+
- The parser only processes findings with test status of "vulnerable-exploited", "vulnerable-version", or "vulnerable-potential" (line 293-294)
57+
- All valid findings are set to active=True by default
58+
59+
#### Description Construction
60+
- The main vulnerability description is converted from HTML to text (lines 324-325)
61+
- Test output (if any) is appended to the description with newlines (lines 334-339)
62+
- If multiple instances of the same vulnerability are found, their outputs are combined in the description
63+
64+
#### Severity Conversion
65+
- Nexpose uses a numeric severity scale from 0-10
66+
- The parser converts this to DefectDojo's text-based severity levels (lines 316-320):
67+
- 9-10: Critical
68+
- 7-8: High
69+
- 4-6: Medium
70+
- 1-3: Low
71+
- 0: Info
72+
73+
#### Deduplication
74+
- Findings are deduplicated based on severity + vulnerability name (line 313)
75+
- If a duplicate is found, the plugin output is appended to the description (lines 335-339)
76+
77+
#### Title Format
78+
- Uses the direct title from the vulnerability definition (line 323)
79+
80+
#### Mitigation Construction
81+
- Converts HTML mitigation text to plain text if present (lines 326-328)
82+
83+
#### References Handling
84+
- Special formatting is applied to different reference types (lines 354-370)
85+
- References are formatted as markdown links to the appropriate external sites for different reference sources
86+
- Special cases for BID, CA, CERT-VN, CVE, DEBIAN, XF, and URL references
87+
- If a CVE reference is found, it's also added to unsaved_vulnerability_ids (lines 371-372)
88+
89+
#### Tags Handling
90+
- Tags from vulnerability definition are collected and added to finding.unsaved_tags (line 347)
91+
92+
#### Endpoint Creation
93+
- Endpoints are created from host information (line 295)
94+
- Port information is added if available (line 297)
95+
- Protocol is determined from service name if possible, otherwise falls back to service protocol (lines 302-307)
96+
- Special handling for DNS services to record TCP/UDP protocol info (lines 301-307)
97+
98+
#### CVSS Processing
99+
- CVSS vector strings are mapped directly to the impact field (line 329)
100+
101+
#### Common Settings for All Findings
102+
- All findings are set to dynamic_finding=True (line 344)
103+
- All findings are set to false_p=False and duplicate=False (lines 342-343)
6104

7105
### Sample Scan Data
8-
Sample Nexpose XML 2.0 (Rapid7) scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/nexpose).
106+
Sample Nexpose XML 2.0 (Rapid7) scans can be found in the [unit test example scans folder](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/nexpose).
107+
108+
### Link To Tool
109+
- [Rapid7 Nexpose](https://www.rapid7.com/products/nexpose/)
110+
- [Nexpose Documentation](https://docs.rapid7.com/nexpose/)

0 commit comments

Comments
 (0)