{% if model.threats %} {% set severity_order = ['Very High', 'High', 'Medium', 'Low', 'Unknown'] %} {% set col_span = all_threat_props | length + 1 %}
{% for prop in all_threat_props %} {% endfor %} {% for severity in severity_order %} {% set ns = namespace(printed=false) %} {% for threat_id, threat in model.threats | dictsort %} {% set threat_severity = threat.severity or "Unknown" %} {% if threat_severity == severity %} {% if not ns.printed %} {% set ns.printed = true %} {% endif %} {% set is_active = threat_id in analysis.threat_counter %} {% for prop in all_threat_props %} {% set req_tokens = threat.mapping.requirements_for_prop(prop) %} {% set mit_tokens = threat.mapping.mitigations_for_prop(prop) %} {% set is_req = req_tokens | length > 0 %} {% set is_mit = mit_tokens | length > 0 %} {% set req_dotted = is_req and prop not in threat.mapping.requirements %} {% set mit_dotted = is_mit and prop not in threat.mapping.mitigations %} {% if is_req and is_mit %} {% elif is_req %} {% elif is_mit %} {% else %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endfor %}
Threats
{{ severity }}
{{ threat_id }}
{{ threat.description | truncate(40) }}
R{% if req_dotted %}*{% endif %}/M{% if mit_dotted %}*{% endif %}R{% if req_dotted %}*{% endif %}{% if mit_dotted %}M*{% else %}✓{% endif %}
{% endif %}