{% extends "layouts/app.html" %} {% block title %}{{ artefact.title }} - Version {{ version_no }}{% endblock %} {% block sidebar %} {% include 'components/sidebar.html' %} {% endblock %} {% block topbar %} {% if not is_pdf_export %}

{{ artefact.title }}

{% if artefact.artefact_type == 'engagement' %}Inspection Report{% elif artefact.artefact_type == 'incident' %}Incident Report{% elif artefact.artefact_type == 'investigation' %}Investigation{% elif artefact.artefact_type == 'assessment' %}Assessment{% else %}{{ artefact.artefact_type|title }}{% endif %} · Version {{ version_no }} · {{ artefact.status }}

{% if audience %}

Audience: {{ audience|capitalize }}

{% endif %}
{% if audience and audience != 'technical' %} Full Detail View {% endif %} Versions Edit Export PDF
{% endif %} {% endblock %} {% block content %} {# Batch 4: Multi-Audience Rendering #} {# Audience Rendering Rules: - executive: Summary-focused, business impact, no detailed sections - technical: Full detail (all sections) - compliance: Evidence-focused, actions, findings #}

{{ payload.meta.title }}

Type: {{ payload.meta.type|capitalize }}
Prepared By: {{ payload.meta.analyst or 'Not specified' }}
Date: {{ payload.meta.date }}
Status: {{ payload.meta.status }}
{% if payload.meta.context %}

Report Context

{% if payload.meta.context.journey %}
Journey: {{ payload.meta.context.journey }}
{% endif %} {% if payload.meta.context.incident_type %}
Incident Type: {{ payload.meta.context.incident_type }}
{% endif %} {% if payload.meta.context.audience %}
Audience: {{ payload.meta.context.audience }}
{% endif %} {% if payload.meta.context.analysis_framework and payload.meta.context.analysis_framework.key %}
Framework: {{ payload.meta.context.analysis_framework.key }} {% if payload.meta.context.analysis_framework.version %} ({{ payload.meta.context.analysis_framework.version }}) {% endif %}
{% endif %}
{% endif %} {% if payload.targets and (audience == 'technical' or audience == 'compliance') %}

Locations & Assets

{% for target in payload.targets %}

{{ target.name }}

{% if target.context %}

{{ target.context }}

{% endif %} {% if target.assets %}

Assets:

    {% for asset in target.assets %}
  • {{ asset.name }} ({{ asset.type }})
  • {% endfor %}
{% endif %}
{% endfor %}
{% endif %} {% if 'incident_case' in payload.modules_enabled and payload.incident_case %}

Timeline & Actions

{% if payload.incident_case.summary %}

Executive Summary

{{ payload.incident_case.summary }}

{% endif %} {% if payload.incident_case.impact %}

Impact Assessment

{% if payload.incident_case.impact.affected_systems %}
Affected Systems:

{{ payload.incident_case.impact.affected_systems }}

{% endif %} {% if payload.incident_case.impact.user_impact %}
User Impact:

{{ payload.incident_case.impact.user_impact }}

{% endif %} {% if payload.incident_case.impact.financial_impact %}
Financial Impact:

{{ payload.incident_case.impact.financial_impact }}

{% endif %} {% if payload.incident_case.impact.reputational_impact %}
Reputational Impact:

{{ payload.incident_case.impact.reputational_impact }}

{% endif %}
{% endif %} {% if payload.incident_case.timeline %}

Timeline of Events

{% if audience == 'technical' %} {# Full timeline for technical #} {% for entry in payload.incident_case.timeline %} {% endfor %}
Time Event Actor Evidence
{{ entry.time }} {{ entry.event }} {{ entry.actor or '-' }} {{ entry.evidence or '-' }}
{% elif audience == 'executive' %} {# Key events only for executive #}

Key Events:

    {% for entry in payload.incident_case.timeline[:5] %}
  • {{ entry.time }}: {{ entry.event }}
  • {% endfor %}

Showing first 5 of {{ payload.incident_case.timeline|length }} events

{% elif audience == 'compliance' %} {# Evidence-focused for compliance #}
    {% for entry in payload.incident_case.timeline %} {% if entry.evidence %}
  • {{ entry.time }}: {{ entry.event }} ({{ entry.evidence }})
  • {% endif %} {% endfor %}
{% endif %}
{% endif %} {% if payload.incident_case.detection and (audience == 'technical' or audience == 'compliance') %}

Detection & Response

{% if payload.incident_case.detection.method %}

Detection Method: {{ payload.incident_case.detection.method }}

{% endif %} {% if payload.incident_case.detection.response %}

Response: {{ payload.incident_case.detection.response }}

{% endif %}
{% endif %} {% if payload.incident_case.root_cause %}

Root Cause Analysis

{% if payload.incident_case.root_cause.primary %}

Primary Cause: {{ payload.incident_case.root_cause.primary }}

{% endif %} {% if audience == 'technical' and payload.incident_case.root_cause.five_whys %}

5 Whys:

{{ payload.incident_case.root_cause.five_whys }}
{% endif %}
{% endif %} {% if payload.incident_case.corrective_actions %}

Corrective Actions

{% if audience == 'technical' or audience == 'compliance' %} {% endif %} {% for action in payload.incident_case.corrective_actions %} {% if audience == 'technical' or audience == 'compliance' %} {% endif %} {% endfor %}
ActionOwner Due DateStatus
{{ action.action }}{{ action.owner or '-' }} {{ action.due_date or '-' }}{{ action.status or 'Pending' }}
{% endif %} {% if payload.incident_case.preventative_actions %}

Preventative Actions

{% if audience == 'technical' or audience == 'compliance' %} {% endif %} {% for action in payload.incident_case.preventative_actions %} {% if audience == 'technical' or audience == 'compliance' %} {% endif %} {% endfor %}
ActionOwner Due DateStatus
{{ action.action }}{{ action.owner or '-' }} {{ action.due_date or '-' }}{{ action.status or 'Pending' }}
{% endif %} {% if payload.incident_case.lessons_learned and (audience == 'executive' or audience == 'technical') %}

Lessons Learned

{% if payload.incident_case.lessons_learned.key_takeaways %}

Key Takeaways:

{{ payload.incident_case.lessons_learned.key_takeaways }}

{% endif %}
{% endif %} {% if payload.incident_case.followup_items and (audience == 'technical' or audience == 'compliance') %}

Follow-up Items

    {% for item in payload.incident_case.followup_items %}
  • {{ item.description or item.item }} - {{ item.owner or 'Unassigned' }}
  • {% endfor %}
{% endif %}
{% endif %} {% if 'risk_modelling' in payload.modules_enabled and payload.risk_modelling and audience == 'technical' %}

Risk Assessment

{% if payload.risk_modelling.risk_matrix %}

Risk Matrix

{% if payload.risk_modelling.risk_matrix.components %}

Components Analysed: {{ payload.risk_modelling.risk_matrix.components|join(', ') }}

{% endif %} {% if payload.risk_modelling.risk_matrix.matrix %} {# Full matrix rendering #} {% for comp, risks in payload.risk_modelling.risk_matrix.matrix.items() %} {% endfor %}
Component Likelihood Severity People Property Compliance Priority
{{ comp }} {{ risks.spoofing or '-' }} {{ risks.tampering or '-' }} {{ risks.repudiation or '-' }} {{ risks.information_disclosure or '-' }} {{ risks.denial_of_service or '-' }} {{ risks.elevation_of_privilege or '-' }}
{% endif %}
{% endif %} {% if payload.risk_modelling.pasta %}

Risk Analysis Notes

{% if payload.risk_modelling.pasta.objectives %}

Objectives: {{ payload.risk_modelling.pasta.objectives }}

{% endif %} {% if payload.risk_modelling.pasta.risks %}

Risks: {{ payload.risk_modelling.pasta.risks }}

{% endif %}
{% endif %} {% if payload.risk_modelling.priority_scores %}

Risk Priority Scores

{% for score in payload.risk_modelling.priority_scores %} {% endfor %}
Risk Item Base Score Severity
{{ score.risk_item or score.vulnerability }} {{ score.score or score.base_score }} {{ score.severity }}
{% endif %}
{% endif %} {% if payload.evidence %} {% if audience == 'executive' %} {# Executive: Summary only #}

Evidence

{{ payload.evidence|length }} evidence items attached to this report.

{% elif audience == 'compliance' %} {# Compliance: Chain-of-custody table #}

Evidence Chain

{% for evidence in payload.evidence %} {% endfor %}
Evidence ID Timestamp (UTC) Description Custodian File Size
{{ evidence.id or 'E-' ~ loop.index|string.zfill(3) }} {{ evidence.timestamp or evidence.uploaded_at or '-' }} {{ evidence.description or evidence.filename }} {{ evidence.uploaded_by or 'System' }} {{ evidence.file_size or '-' }}

Evidence preserved in accordance with chain-of-custody procedures.

{% else %} {# Technical: Full detail #}

Evidence

{% for evidence in payload.evidence %} {% endfor %}
ID Filename Description Timestamp Size
{{ evidence.id or 'E-' ~ loop.index|string.zfill(3) }} {{ evidence.filename }} {{ evidence.description or '-' }} {{ evidence.timestamp or evidence.uploaded_at }} {{ evidence.file_size or '-' }}
{% endif %} {% endif %}
{% endblock %}