Skip to content

Reports Module Overview

The Reports module serves as the central hub for security assessment documentation in SPEAR. It provides a sophisticated editor system, real-time collaboration, an extensive findings library, reusable content management, and professional multi-format export capabilities.

Four specialized editor variants built on the unified Edra foundation (Tiptap-based) provide context-appropriate editing experiences. Each editor type offers specific features for its use case—from collaborative report sections to conditional SOW templates.

Y.js-powered collaborative editing enables multiple team members to work simultaneously on report sections. Live cursors show collaborator positions, and changes sync instantly across all connected clients.

Centralized repository for vulnerabilities, weaknesses, and strengths. Includes auto-mapping rules to automatically categorize imported findings and a validation workflow for quality control.

Reusable content blocks with version history, import/export capabilities, and linked content that automatically syncs when source material changes.

Professional PDF generation with customizable themes and branding, DOCX export for editable documents, and public portal sharing for client-accessible web reports.

flowchart LR
    A[Create Report] --> B[Write & Collaborate] --> C[Add Findings] --> D[Review]
    D --> E{Approved}
    E -->|Yes| F[Export PDF] --> G[Deliver]
    E -->|No| B

Reports consist of hierarchical sections defined by templates. Each section can be:

  • Static - Fixed content defined in template
  • Freeform - User-editable rich text content
  • Dynamic - Auto-generated from data (e.g., findings tables)
  • PDF Only - Content rendered only in PDF exports

Report templates define the structure and default content for reports. Templates include:

  • Section hierarchy and ordering
  • Section types and configurations
  • Default content blocks
  • Page break rules

The primary editing interface for report sections. Supports:

  • Rich text formatting with toolbar controls
  • Image insertion and management
  • Table creation and editing
  • Shortcode insertion for dynamic values
  • Content library integration
🖥️ Report Builder Modal Screenshot
  1. Navigate to Reports in the console sidebar
  2. Click New Report to open the Report Builder Modal
  3. Select a template and target project
  4. Configure report options (title, theme, etc.)
  5. Click Create to generate the report structure
  1. Open a report from the reports list
  2. Navigate sections using the sidebar
  3. Click on a section to open the editor
  4. Use the toolbar for formatting options
  5. Changes save automatically
  1. Open the report you want to export
  2. Click the Export button in the toolbar
  3. Select PDF or DOCX format
  4. Configure export options (theme, page size, etc.)
  5. Click Export to generate the document
🖥️ Report Structure with Section Hierarchy Screenshot

The Reports module is organized into several areas:

ComponentLocation
Reports pagefrontend/src/routes/console/reports/+page.svelte
Report servicefrontend/src/lib/services/reports.service.ts
Backend routesbackend/api/reports/routes.go
Report builderfrontend/src/lib/components/reports/ReportBuilderModal.svelte

The Reports module integrates with:

  • Projects - Reports are scoped to specific projects
  • Operations - Vulnerabilities can be mapped to report findings
  • Services - Service definitions drive report content
  • Templates - Report structure defined by templates
  • Themes - PDF styling controlled by theme settings
  • Branding - Organization branding in exports