{% extends "base.html" %} {% block title %}{{ threat_id }}: {{ threat.description }} - Threat Model{% endblock %} {% block content %}

{{ threat_id }}: {{ threat.description }}

{{ threat.details }}

{% if threat.example %}

Examples

{{ threat.example }}

{% endif %} {% if threat.comment %}

Comment

{{ threat.comment }}

{% endif %}
{{ threat.severity or "Unknown" }}
Severity
{{ frequency }}
occurrences in scenarios
Frequency
{{ components | length }}
Affected Components
{{ threat_scenario_data | length }}
Affected Scenarios

Requirements and Mitigations

Requirements

Component properties that must be true for this threat to apply:

{% for prop in threat.mapping.requirements %} {{ prop | replace('_', ' ') }} {% else %} None specified. {% endfor %}

Mitigations

Component properties that mitigate this threat:

{% for prop in threat.mapping.mitigations %} {{ prop | replace('_', ' ') }} {% else %} None specified. {% endfor %}

Affected Components

{% if components %} {% for comp_name in components %} {% endfor %}
Component Description Boundary
{{ comp_name }} {{ model.components[comp_name].description if comp_name in model.components else 'N/A' }} {{ model.components[comp_name].inBoundary if comp_name in model.components else 'N/A' }}
{% else %}

No components affected by this threat.

{% endif %}

Affected Scenarios

{% if threat_scenario_data %} {% for item in threat_scenario_data %}
{{ item.scenario.name }} — affects: {% for comp in item.affected_components %} {{ comp }} {% endfor %} {% if item.highlighted_dfd %} {% with src=item.highlighted_dfd, zoom_style="margin-top: 0.75rem;" %} {% include "includes/dfd_diagram.html" %} {% endwith %} {% else %}

No data flow diagram available for this scenario.

{% endif %}
{% endfor %} {% else %}

No scenarios affected by this threat.

{% endif %}

Back to Summary

{% endblock %} {% block scripts %} {% set has_dfd = threat_scenario_data | selectattr("highlighted_dfd") | list | length > 0 %} {% include "includes/diagram_scripts.html" %} {% endblock %}