{% extends "base.html" %} {% block title %}Stats - Threat Model{% endblock %} {% block content %}

Stats

{{ analysis.threat_counter | length }}
of {{ model.threats | length }} defined
Active Threats
{{ model.scenarios | length }}
Scenarios
{{ model.components | length }}
Components
{{ model.properties | length }}
Properties

Threats by Severity

pie showData {% for severity, count in analysis.severity_distribution.items() %} "{{ severity or "Unknown" }}" : {{ count }} {% endfor %}
{% set max_sev = analysis.severity_distribution.values() | max %} {% for severity, count in analysis.severity_distribution.items() %} {% set pct = (count / max_sev * 100) | int %}
{{ severity or "Unknown" }}
{{ count }}
{% endfor %}

Mitigation Coverage

{{ mitigated }}
Mitigated
{{ unmitigated }}
Not Mitigated
{% if total_pairs %}

{{ mitigated }} of {{ total_pairs }} threat-component pairs have at least one mitigation in place ({{ (mitigated / total_pairs * 100) | round(1) }}%).

{% endif %}

Most Affected Components

{% for comp_name, count in most_affected_components %} {% endfor %}
Component Threats
{{ comp_name }} {{ count }}

Threats by Frequency

{% set max_count = analysis.threats_by_frequency[0][1] if analysis.threats_by_frequency else 1 %} {% for threat_id, count in analysis.threats_by_frequency %} {% set pct = (count / max_count * 100) | int %} {% endfor %}
Threat ID Description Severity Occurrences
{{ threat_id }} {{ model.threats[threat_id].description }} {{ model.threats[threat_id].severity or "Unknown" }} {{ count }}
{% if unmapped_threats %}

Threats Without Mitigations

These active threats have no mitigation mappings defined:

{% endif %}

Back to Summary

{% endblock %} {% block scripts %} {% endblock %}