Skip to main content

Reporting

The output of an investigation is a report: a structured, auditable account of what was found and how risky the subject is. Reports are generated server-side from the canonical knowledge graph, rendered to HTML/PDF via Jinja2 templates, sanitised for PII, and stored in MinIO. The frontend renders the same underlying data as interactive tabs.

Server-side generation

report_generator.py (src/services/) builds the narrative; canonical_synthesis.py (src/ontology/) assembles the canonical entity view from the graph; report_sanitizer.py redacts PII before output. The HTML templates under src/templates/ compose a report from partials — cover, sanctions table, risk grid, key-value grids, ownership tree, section sheets, and sparklines — and the result is rendered to PDF and uploaded to MinIO.

Asynchronous reports

Report generation can take time, so the API returns 202 Accepted while a report is still being produced. The frontend's useReport(id) hook polls until the report is ready.

The report in the Console

In the frontend, ReportView presents the report as tabs, each backed by report components (src/components/report/):

TabContentComponent(s)
OverviewRisk gauge, critical findings, recommendationsrisk gauge, finding cards
ModulesPer-module findingsdetailed findings
EvidenceEvidence records with source & statusevidence bundle
OntologyOntology-aligned entity graphOntologyEntityGraph, ontology findings
LineageEntity relationships & field provenanceLineageGraph, PropertyLineage
WorkflowTask/activity execution timelineworkflow view, timeline
RawFull report JSONJSON viewer

Provenance in the report

Because every canonical value carries its claims and mutations, the report can show why a value is what it is — the PropertyLineage view traces each field back to the provider and claim that produced it, satisfying the field-provenance requirement of ADR-020 and the AI-governance lineage of ADR-014.

Exports

Beyond the investigation report, the ontology export router can produce per-company PDF/DOCX documents (src/api/ontology_export_router.py), and the frontend can render client-side PDFs via @react-pdf/renderer for certain views.