-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs: add field info Rapidfire vulnerability scanner #11909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
skywalke34
wants to merge
17
commits into
DefectDojo:dev
Choose a base branch
from
skywalke34:rapidfire-clean
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8d3ae9e
Add Rapidfire vulnerability scanner parser
b913018
Fix formatting in Rapidfire parser's impact section and ruff lint errors
5060283
Fix Rapidfire parser's ruff lint errors again
643f8e3
Fix Rapidfire parser's ruff lint errors yet again
2fdad40
Fix Rapidfire parser's ruff lint errors 3rd time a charm
e395078
Fix Rapidfire parser's ruff lint errors 4th time
4d8ab42
Fix Rapidfire parser's ruff lint errors 1 missing line!
5f229c6
Missing title in doc
0735e2a
Merge remote-tracking branch 'upstream/dev' into rapidfire-clean
ab37194
Merge remote-tracking branch 'upstream/dev' into rapidfire-clean
b6b1c96
Update documentation details within parser code, unit tests and unitt…
d4311d1
Clean Ruff lint errors
5faea6e
Broke unit tests with missing spaces.
48650de
Ruff Lint Errors
514c3b4
Update rapidfire.md
Maffooch bf43cab
Update rapidfire.md to include missing sections
skywalke34 067ca30
Merge branch 'DefectDojo:master' into rapidfire-clean
skywalke34 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
docs/content/en/connecting_your_tools/parsers/file/rapidfire.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Rapidfire CSV Parser | ||
toc_hide: true | ||
--- | ||
|
||
# Rapidfire CSV Parser | ||
|
||
## CSV Field Mappings | ||
|
||
Total Fields in CSV: 17 | ||
|
||
| CSV Field | Finding Field | Parser Line # | Notes | | ||
|-----------|---------------|---------------|-------| | ||
| IP Address | endpoints[].host | 162-173 | Used if hostname not available | | ||
| Hostname | endpoints[].host | 162-173 | Primary choice for endpoint host | | ||
| MAC Address | description | 134-136 | Added to description with "MAC Address:" prefix | | ||
| Severity | severity | 149 | Capitalized and validated against SEVERITIES, defaults to Info | | ||
| Issue | title | 107-110 | Direct mapping, stripped of whitespace | | ||
| Ports | endpoints[].port | 165-166 | Extracted number before "/" using regex | | ||
| OID | vuln_id_from_tool | 152 | Direct mapping | | ||
| CVE | unsaved_vulnerability_ids | 176-177 | Split on comma, filtered to valid CVE IDs | | ||
| Last Detected | date | 151 | Parsed to datetime using dateutil.parser | | ||
| Known Exploited Vulnerability | description | 131-132 | Added to description with prefix | | ||
| Summary | description | 117-118 | Added to description with "Summary:" prefix | | ||
| Vulnerability Detection Result | description | 119-120 | Added to description with prefix | | ||
| Solution | mitigation | 150 | Direct mapping | | ||
| Vulnerability Insight | impact | 82-103 | Formatted with CVEs into impact field | | ||
| Vulnerability Detection Method | description | 121-122 | Added to description with prefix | | ||
| References | references | 70-124 | Formatted into markdown list of links | | ||
| Known To Be Used In Ransomware Campaigns | description, tags | 137-138, 179-180 | Adds warning to description and "ransomware" tag | | ||
|
||
## Summary | ||
|
||
* Total CSV Fields: 17 | ||
* Mapped Fields: 17 | ||
* Unmapped Fields: 0 | ||
|
||
## Additional Finding Field Settings | ||
|
||
| Finding Field | Value | Parser Line # | Notes | | ||
|---------------|-------|---------------|-------| | ||
| test | test parameter | 153 | Set from test parameter passed to get_findings | | ||
| dynamic_finding | True | 153 | Hardcoded to True for all findings | | ||
| static_finding | False | 154 | Hardcoded to False for all findings | | ||
|
||
## Processing Notes | ||
|
||
* Deduplication is performed using combination of title, IP address, hostname and port | ||
* For duplicate findings, the existing finding is updated rather than creating a new one | ||
* The parser uses csv.DictReader with comma delimiter and quote character | ||
* Empty rows are skipped | ||
* References are formatted into a readable markdown list with descriptive link text | ||
* Impact field is specially formatted to combine vulnerability insight and CVE details | ||
* Date parsing handles various formats and falls back to current time | ||
* Port extraction handles various formats like "8080/tcp" or "443/tcp (https)" | ||
|
||
### File Types | ||
The Rapidfire parser accepts CSV files exported from Rapidfire vulnerability scanner. The CSV should contain vulnerability findings with fields including IP address, hostname, severity, issue details, CVEs, and other metadata. | ||
|
||
### Sample Scan Data | ||
Sample scan data for the Rapidfire CSV parser can be found in the [unittests/scans/rapidfire](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/rapidfire) directory. | ||
There are samples for: | ||
* `one_vuln.csv` - A file containing a single vulnerability finding | ||
* `many_vulns.csv` - A file containing multiple vulnerability findings | ||
* `no_vuln.csv` - An empty scan with no vulnerabilities | ||
|
||
### Link To Tool | ||
Rapidfire is a commercial vulnerability scanning tool used for network and application security assessments. For more information, visit the vendor's website [www.rapidfire.com](https://www.rapidfire.com/). |
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
Empty file.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't leave out
invalid_date.csv
andcomplex_ports.csv
! Those are awesome too!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have created more issues by creating the invalid_date.csv and complex_ports.csv early when encountering errors. I have access an original rapidfire .csv output with more than 2 examples, so I will review the accuracy of these unit test .csv files...