Proposed Changes
Fixes #2063 — adds PDF export support for nuclei scan results.
Implementation
New pdf exporter following the existing Exporter interface pattern. Collects results during the scan and generates the PDF report on Close().
Report contents:
- Title page with scan metadata and timestamp
- Color-coded severity summary (critical/high/medium/low/info)
- Findings overview table
- Detailed per-finding pages with description, references, extracted results, and request/response blocks
Library: Uses github.com/go-pdf/fpdf — the actively maintained fork of jung-kurt/gofpdf (which is archived).
Config example:
pdf:
file: scan-report.pdf
omit-raw: false
Changes
| File |
Change |
pkg/reporting/exporters/pdf/pdf.go |
New PDF exporter |
pkg/reporting/options.go |
Add PDFExporter field |
pkg/reporting/reporting.go |
Register PDF exporter |
go.mod / go.sum |
Add go-pdf/fpdf dependency |
Checklist
- PR created against the
dev branch
- Follows existing exporter interface pattern
- Uses actively maintained PDF library (not archived gofpdf)
-
go build passes on changed packages
- Minimal diff: 5 files, +254 lines
/claim #2063
Summary by CodeRabbit
- New Features
- Added PDF export for scan results with multi-page reports: title page, severity summary, overview table, and per-result detail sections.
- PDF generation uses severity-based styling, per-row formatting, and automatic truncation for large payloads; includes an option to omit raw request/response data.
- Reporting configuration now supports enabling/configuring the PDF exporter and is included in default initialization.