{% extends "base.html" %} {% from "_macros.html" import findings_badges, empty_state, info_tip %} {% set verdict_projects = projects | selectattr("design_verdict") | list %} {% block title %}{{ skill.nav_label }} — secfoo{% endblock %} {% block content %} {% from "_page.html" import page_head %} {{ page_head(skill.id, "Activity", skill.name, skill.description) }} {% if run_count == 0 %} {% call empty_state("No " ~ skill.name ~ " runs yet", "/assessments", "Go to assessments", "u-mt-6") %} The figures below fill in after the first run. Start one from an assessment's Run Assessment page, or run secfoo run --skill {{ skill.id }}. {% endcall %} {% endif %} {% if dash %} {% include "activities/architecture_dashboard.html" %} {% endif %} {% if tm_dash %} {% include "activities/threat_modeling_dashboard.html" %} {% endif %} {% if sca_dash %} {% include "activities/sca_dashboard.html" %} {% endif %} {% if sast_dash %} {% include "activities/sast_dashboard.html" %} {% endif %} {% if secret_dash %} {% include "activities/secret_scanning_dashboard.html" %} {% endif %} {% if not tm_dash and not dash and not sca_dash and not sast_dash and not secret_dash %} {# All three program dashboards above already cover coverage, findings, and trust-boundary counts with more specific tiles -- this generic block would just duplicate them. #}
{% call info_tip("Projects covered") %}

Projects with at least one run of this activity.

A project with only a failed run is still listed. Coverage on the program dashboards counts successful reviews only.

{% endcall %} {{ projects | length }} Projects covered
{% call info_tip("Runs") %}

How many times this activity has been run, across those projects.

Repeats count. This is not the number of projects.

{% endcall %} {{ run_count }} Runs
{% call info_tip("Total findings") %}

Finding counts written on this activity's runs, added together.

Repeat runs count again, so this can be higher than the open findings you would fix today.

{% endcall %} {{ severity.total }} Total findings
{% call info_tip("Critical + High") %}

The critical and high counts from those same runs, added together.

Medium, low, and info findings are in Total findings and not in this number.

{% endcall %} {{ severity.critical + severity.high }} Critical + High
{% if verdict_projects %}
{% call info_tip("Projects not cleanly Sound") %}

Projects whose latest design verdict is anything other than Sound.

The first number is those projects. The second is every project that has a verdict.

{% endcall %} {{ verdict_projects | rejectattr("verdict_label", "equalto", "Sound") | list | length }}/{{ verdict_projects | length }} Projects not cleanly Sound
{% call info_tip("Trust boundaries identified") %}

Trust boundaries called out in the latest review of each project, added together.

A boundary is a place data crosses from one trust level to another, such as from the internet into an API.

{% endcall %} {{ projects | sum(attribute="boundary_count") }} Trust boundaries identified
{% endif %}
{% endif %} {% if recent_verdicts %}
{% call info_tip("Design verdicts") %}

The design verdict from each project's latest successful review, and the reason the report gave.

Open a row to read the full review. Only the latest verdict per project is shown.

{% endcall %}

Design verdicts

{% if verdict_count > recent_verdicts | length %}Latest {{ recent_verdicts | length }} of {{ verdict_count }} projects{% else %}Latest review per project{% endif %}
{% for p in recent_verdicts %} {% endfor %}
ProjectVerdictWhyReviewed
{{ p.project_display_name }} {{ p.verdict_label }} {{ p.verdict_reason or "—" }} {{ (p.latest_success_at or "")[:10] or "—" }}
{% endif %} {% if not dash and not sca_dash and not sast_dash and not secret_dash %} {# Security Architecture Review's and SCA's own program dashboards above already have their own severity/disposition breakdowns -- a raw severity-count bar here would just be a second, less specific cut of the same findings. #}
{% call info_tip("Findings by severity") %}

Severity counts written on this activity's runs.

Repeat runs count again. A project scanned twice contributes both scans.

{% endcall %}

Findings by severity

{% for row in severity_rows %}
{{ row.label }}
{{ row.count }}
{% endfor %}
{% endif %} {% if diagrams_available and skill.id != "threat-modeling" %}

Architecture diagram

Data flow diagram from the selected project's most recent successful review.

{% if diagram_projects | length > 1 %}
{% endif %} {% if selected_diagram_project %} {{ selected_diagram_project.project_display_name }} {% if selected_diagram_project.design_verdict %}
{{ selected_diagram_project.verdict_label }} {% if selected_diagram_project.verdict_reason %}

{{ selected_diagram_project.verdict_reason }}

{% endif %}
{% endif %} {% if mermaid_available %}
{{ selected_diagram_project.diagram_source }}
{% else %}
{{ selected_diagram_project.diagram_source }}
{% endif %}
{% endif %} {% if not mermaid_available %}
Showing raw diagram source. Run secfoo vendor mermaid to render these as pictures.
{% endif %} {% endif %}

By project

{% if by_project_total > by_project_rows | length %} Latest {{ by_project_rows | length }} of {{ by_project_total }} {% endif %}
{% if by_project_rows %}
{% if verdict_projects %}{% endif %} {% if review_states is not none %}{% endif %} {% for p in by_project_rows %} {% if verdict_projects %}{% endif %} {% if review_states is not none %} {% set rs = review_states.get(p.project_id) %} {% endif %} {% endfor %}
ProjectRunsLatestStatusBoundariesFindingsReview status
{{ p.project_display_name }}
{{ p.project_kind }}
{{ p.run_count }} {{ p.latest_started_at | fmt_time }} {{ p.latest_status }}{{ p.boundary_count or "-" }}
{{ findings_badges(p) }}
{% if p.latest_assessment_id %} Assessment {% endif %} {% if not p.latest_success_run_uuid %}No successful review {% elif rs and rs.state == "boundary_changed" %}Trust boundary changed {% elif rs and rs.state == "stale" %}Stale ({{ rs.days_since_review }}d) {% else %}Current{% endif %}
{% else %}
No project has been scanned with this activity yet. Start one from an assessment's Run Assessment page, or run secfoo run --skill {{ skill.id }}.
{% endif %} {% if diagrams_available and skill.id != "threat-modeling" and mermaid_available %} {# Same loader as run_detail.html -- see that template for why it's vendored locally (works offline) and loaded as a classic script rather than an ES module import (the bundle is an IIFE that assigns globalThis.mermaid, not an ES module). The init/run call itself lives in the external mermaid-init.js file below, not inline here -- the portal's CSP (default-src 'self', no 'unsafe-inline') silently blocks inline JS, so it never actually ran there even though the library file loaded fine. #} {% endif %} {% endblock %}