Skip to content

Fix: export reports respect section preferences - #145

Merged
spoofzu merged 1 commit into
masterfrom
fix/export-section-filtering
Apr 3, 2026
Merged

spoofzu merged 1 commit into
masterfrom
fix/export-section-filtering

Conversation

@spoofzu

@spoofzu spoofzu commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bug: Exporting scan reports to PDF, HTML, JSON, or text included all sections regardless of which sections were enabled in Settings > Engine. The GUI display correctly showed only enabled sections but the export paths did not filter.
  • Fix: Extracted buildVisibleSections() into ReportExporter as a shared utility and applied section filtering to all export code paths — single-host (ScanNode tree walk) and multi-target (heat map) exports across all formats.
  • Consolidation: MainFrm.buildVisibleSections() now delegates to ReportExporter to eliminate duplicated logic.

Test plan

  • Configure Settings > Engine with only TLS Risk Assessment enabled
  • Run a scan, save as PDF — verify only risk section appears
  • Save as HTML — verify only risk section appears
  • Save as JSON — verify only risk section appears
  • Save as text — verify only risk section appears
  • Load a saved .dvscan file, export to PDF — verify section filtering applies
  • Enable all sections, export — verify all sections appear
  • In workbench mode, selectively enable/disable sections and verify exports match

🤖 Generated with Claude Code

… JSON, and text

Report exports were including all scan sections regardless of which
sections were enabled in Settings. The GUI display correctly filtered
sections but the export code paths did not apply the same filtering.

- Add buildVisibleSections() to ReportExporter as shared utility
- Apply section filtering to single-host exports (saveAsPdf, saveAsHtml, saveAsJson)
- Apply section filtering to multi-target exports (saveScanAsPdf, saveScanAsHtml, saveScanAsJson)
- Fix inline text export in MainFrm.onSaveHostDetail()
- Consolidate MainFrm.buildVisibleSections() to delegate to ReportExporter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@spoofzu
spoofzu merged commit 98dde9d into master Apr 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant