Reporting & output
The output/ package renders scored and enriched vulnerability data into
deliverables. Three formats are supported, each with its own generator:
| Format | Generator | Best for |
|---|---|---|
| Excel (.xlsx) | output.formatters.excel.ExcelReportGenerator | analyst-facing, multi-sheet working reports |
| Word (.docx) | output.formatters.docx.DOCXReportGenerator | branded executive & technical client deliverables |
| CSV | CLI export helpers (csv.DictWriter / DataFrame.to_csv) | raw data hand-off / spreadsheet import |
All three read the same in-memory models — VulnerabilityFinding,
ApplicationRiskScore, RiskMetrics, ReportMetadata from
output/core/models.py — so severity, CVSS, EPSS and exploit flags render
consistently across formats. Styling and branding are centralized in
output/config/formatting.py.
Sample outputs are shipped with the docs:
- Executive summary (DOCX): sample_executive_summary.docx
- Technical report (DOCX): sample_technical_report.docx
- Excel workbooks:
foxit_comprehensive_report.xlsx,foxit_full_enrichment_report.xlsx,rapid7_complete_system_report.xlsx,complete_report_all_assets.xlsx,version_tracking.xlsx— all under/docs/examples/reports/. - CSV:
server_report.csv,server_with_cves.csv,server_full_details.csv.
Excel (.xlsx) reports
ExcelReportGenerator (built on openpyxl) composes a workbook from modular
sheet handlers — one class per sheet, each with add_to_workbook(...). A
shared ExcelStyler supplies fonts, header fills, borders and severity coloring
(critical red C00000, high FFC7CE, medium FFEB9C, low C6EFCE).
generate_full_report() — the comprehensive workbook
Assembles, in order:
| Sheet | Contents |
|---|---|
| Cover | Title, client name, report date, CONFIDENTIAL classification, company info |
| Security Bulletins | Main findings table — CVE ID, Severity, CVSS, Application, Vendor, Patch Available (severity-colored) |
| Vendor Summary | Per-vendor rollup — applications, critical vulns, priority |
| High Priority Apps | Applications with ≥ 50 devices |
| Risk Analysis | Per-app risk scores, sorted highest-first (Application, Vendor, Devices, Vulns, Critical, Risk Score, Priority) |
| Remediation Tracking | SLA table — CVE, Severity, Application, SLA Days, Due Date, Status, Owner |
| Research Sources | Reference links (NVD, CVE.org, CISA KEV, X-Force, GitHub CVE) as clickable hyperlinks |
generate_findings_only() is the lighter variant: Cover + Security Bulletins +
Remediation Tracking.
Integration & enrichment sheets
output/formatters/excel/sheets.py also defines source- and enrichment-specific
sheets used when the corresponding data is present:
- Rapid7 Vulnerabilities — raw InsightVM data (title, CVSS, CVE ids, exploits, malware kits, solution, references), frozen header, filtered.
- Defender Vulnerabilities — Defender data (exposed machines, exploit verified/public, exploit types); exposed-machine counts > 50 are highlighted.
- Version Spread Overview — software version fragmentation (install counts, version count, % on most-common version, oldest/newest).
- Executive Summary, All Vulnerabilities, Risk Scoring, Threat
Intelligence, Enrichment Details, Action Items — the enrichment-driven
sheets that render an
EnrichedCVE/ScoredCVEJSON payload (OTX pulses, threat actors, MITRE techniques, CPE matches, per-source success/fail, ranked risk scores, timeline-mapped actions). CVE ids link to NVD and CWEs to cwe.mitre.org.
A separate output/rapid7_report.py (Rapid7ExcelReport) produces a
standalone multi-sheet dump of everything a Rapid7 pull returns — this is what
generated the rapid7_*_report.xlsx examples.
DOCX branded reports
DOCXReportGenerator (built on python-docx) produces Lockstep-branded Word
documents. Branding is applied through DOCXStyler and output/config/formatting.py:
- Fonts: Archivo (titles/headings/body), Bilo (subheadings).
- Brand color: Lockstep orange
#E85E28(RGB 232, 94, 40); deep grey#3D3D3Cfor headers. - Every page gets a right-aligned logo in the header (falls back to a
text company name if the logo file isn’t found), a
CONFIDENTIALwatermark (a rotated VML text shape behind content, with a plain-text fallback), a confidentiality footer, andPage X of Yfields. - Severity uses the brand palette (critical = Lockstep orange, high/medium = accent oranges, low = renewing green).
_setup_document_structure() wires up the header/footer/watermark before any
content is added. Four report templates are available:
generate_executive_summary()
The client-facing summary — six numbered sections:
- Executive Summary — intro + vulnerability overview (severity counts from
RiskMetrics.from_findings). - Risk Assessment — risk metrics and narrative.
- Top Priority Findings — top 10 critical/high findings as a summary table.
- Remediation — recommendations section.
- Detailed Vulnerability Listings — up to 20 findings, each a numbered sub-section with a details table (Application, CVSS, CWE, Exploited, EPSS, Affected Versions), description, solution, and references.
- Security Analysis — placeholder for custom analysis.
→ See sample_executive_summary.docx.
generate_technical_report()
The full technical deliverable: severity overview followed by all findings sorted by severity weight then CVSS, with complete descriptions.
→ See sample_technical_report.docx.
generate_compliance_report() & generate_remediation_tracking()
- Compliance — maps findings to a framework’s controls (built-in mappings for NIST CSF, CIS Controls, SOC 2).
- Remediation tracking — a remediation/SLA table as a standalone document.
CSV export
CSV is produced directly by the CLI rather than by a dedicated generator:
vulnmgmt export <data.csv> --format csv -o filtered.csvwrites a filtered application inventory via pandasDataFrame.to_csv.vulnmgmt integrations explore rapid7 <resource> --export <file>.csvstreams live Rapid7 assets/devices/vulnerabilities to CSV viacsv.DictWriter. Theserver_report.csv,server_with_cves.csvandserver_full_details.csvexamples came from this path (--include-vulnsadds the CVE columns).
# Filtered inventory to CSVvulnmgmt export data/AppInventory.csv --format csv --min-devices 50 -o filtered.csv
# Live Rapid7 assets / devices with vulns to CSVvulnmgmt integrations explore rapid7 assets --limit 0 --export assets.csvvulnmgmt integrations explore rapid7 devices --include-vulns --export server_full_details.csvHow the CLI produces reports
The primary entry point is vulnmgmt vuln export, which turns a scan/enrichment
JSON result into a report and chooses the generator from the --format flag:
# Scan + enrich → JSONvulnmgmt vuln scan apps.json --enrich --sources otx -o foxit.json
# JSON → Excel (default) or DOCXvulnmgmt vuln export foxit.json -o foxit_report.xlsxvulnmgmt vuln export foxit.json -o foxit_report.docx -f docx-f xlsx(default) →_generate_excel_report()builds a workbook (including the enrichment sheets such as Executive Summary and All Vulnerabilities) from the JSON.-f docx→_generate_docx_report()constructs aReportMetadataand callsDOCXReportGenerator.generate_executive_summary().
Other commands emit reports too:
vulnmgmt process <inventory.csv> -o report.xlsx— one-shot process → workbook.vulnmgmt vuln pipeline <apps.json> -o results.json --excel report.xlsx— the full convert → scan → enrich → score → report pipeline, optionally also writing Excel.vulnmgmt versions <data.csv> -o version_report.xlsx— the version-spread workbook (seeversion_tracking.xlsx).
Related
- Threat intelligence & enrichment — produces the scored/enriched data these reports render.
- Integrations library — Rapid7/Defender/SentinelOne clients behind the source-specific sheets.
- CLI commands — full command reference.