From 96fdd9fa854f3175f3c5bb98f0dd43460393a8dc Mon Sep 17 00:00:00 2001 From: Kitos Date: Mon, 18 May 2026 14:00:40 +0200 Subject: [PATCH] feat(reports): add quarterly and technique HTML templates [FASE-2.2] Introduce quarterly_summary and technique_detail Jinja layouts; use SVG logo asset across report covers. --- .../templates/reports/coverage_report.html | 2 +- .../templates/reports/executive_summary.html | 2 +- .../templates/reports/purple_campaign.html | 2 +- .../templates/reports/quarterly_summary.html | 72 +++++++++++++++++++ .../templates/reports/technique_detail.html | 62 ++++++++++++++++ 5 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 backend/app/templates/reports/quarterly_summary.html create mode 100644 backend/app/templates/reports/technique_detail.html diff --git a/backend/app/templates/reports/coverage_report.html b/backend/app/templates/reports/coverage_report.html index 228abb0..52eb02f 100644 --- a/backend/app/templates/reports/coverage_report.html +++ b/backend/app/templates/reports/coverage_report.html @@ -7,7 +7,7 @@
- +

MITRE ATT&CK Coverage Report

{{ company_name }}

{{ generated_at }}

diff --git a/backend/app/templates/reports/executive_summary.html b/backend/app/templates/reports/executive_summary.html index 3ef6f4b..07d86a7 100644 --- a/backend/app/templates/reports/executive_summary.html +++ b/backend/app/templates/reports/executive_summary.html @@ -7,7 +7,7 @@
- +

Executive Security Summary

{{ company_name }}

{{ generated_at }}

diff --git a/backend/app/templates/reports/purple_campaign.html b/backend/app/templates/reports/purple_campaign.html index 9326b28..2f554ef 100644 --- a/backend/app/templates/reports/purple_campaign.html +++ b/backend/app/templates/reports/purple_campaign.html @@ -7,7 +7,7 @@
- +

Purple Team Assessment Report

{{ campaign.name }}

{{ generated_at }}

diff --git a/backend/app/templates/reports/quarterly_summary.html b/backend/app/templates/reports/quarterly_summary.html new file mode 100644 index 0000000..ad66e49 --- /dev/null +++ b/backend/app/templates/reports/quarterly_summary.html @@ -0,0 +1,72 @@ + + + + + + Quarterly Summary — {{ company_name }} + + +
+ +

Quarterly Security Summary

+

{{ quarter_label }}

+

{{ generated_at }}

+

{{ classification | default('INTERNAL') }}

+
+ +
+

1. Quarter Overview

+
+
+ {{ tests_this_quarter }} + Tests Executed +
+
+ {{ org_score.overall | default(0) }}% + Org Score +
+
+ {{ detection_rate }}% + Detection Rate +
+
+
+ +
+

2. Coverage Trend

+ + + + + + + + + + + {% for row in trend_rows %} + + + + + + + {% endfor %} + +
DateValidatedTotal TechniquesOrg Score
{{ row.date }}{{ row.validated_count }}{{ row.total_techniques }}{{ row.organization_score }}%
+
+ +
+

3. Top Gaps

+
    + {% for gap in top_gaps %} +
  • {{ gap.tactic }}: {{ gap.coverage_pct }}% coverage
  • + {% endfor %} +
+
+ +
+

{{ company_name }} — Confidential

+
+ + diff --git a/backend/app/templates/reports/technique_detail.html b/backend/app/templates/reports/technique_detail.html new file mode 100644 index 0000000..3c2507e --- /dev/null +++ b/backend/app/templates/reports/technique_detail.html @@ -0,0 +1,62 @@ + + + + + + Technique Detail — {{ technique.mitre_id }} + + +
+ +

Technique Assessment

+

{{ technique.mitre_id }} — {{ technique.name }}

+

{{ generated_at }}

+
+ +
+

1. Technique Profile

+ + + + + + + + +
MITRE ID{{ technique.mitre_id }}
Name{{ technique.name }}
Tactic{{ technique.tactic or 'N/A' }}
Status{{ technique_status }}
Review required{{ 'Yes' if technique.review_required else 'No' }}
+ {% if technique.description %} +

{{ technique.description }}

+ {% endif %} +
+ +
+

2. Test History

+ + + + + + + + + + + {% for test in tests %} + + + + + + + {% else %} + + {% endfor %} + +
TestStateDetectionCreated
{{ test.name }}{{ test.state }}{{ test.detection_result }}{{ test.created_at }}
No tests recorded for this technique.
+
+ + + +