{% from "partials/_macros.html" import verdict_pill %} {# ----- shared HTMX attrs for any interaction targeting #findings ----- #} {% set hx_common = 'hx-get="/fragments/findings" hx-target="#findings" hx-swap="innerHTML" hx-include="#findings-filters"' %} {# Confidence bar color tracks the verdict so the bar reinforces severity at a glance (red for malicious, amber for suspicious, etc.). #} {% set conf_color = { 'malicious': 'bg-red-500', 'suspicious': 'bg-amber-500', 'unknown': 'bg-slate-500', 'benign': 'bg-emerald-500', } %} {# Sort-header macro: clicking toggles asc/desc on the same column, always resets to page 1. Active column shows a small arrow. #} {% macro sort_th(col, label, extra='') %} {% set next_order = 'desc' if (sort == col and order == 'asc') else ('asc' if sort == col else 'desc') %}
| status | {{ sort_th('collector', 'collector') }} {{ sort_th('category', 'category') }} {{ sort_th('confidence', 'conf', 'w-40') }}artifact | {{ sort_th('judged', 'judged', 'text-right w-24') }}||||||
|---|---|---|---|---|---|---|---|
| {{ verdict_pill(f.verdict) }} {% if f.novel %} ✦ novel {% endif %} | {% if resolved %} ✓ resolved {% else %} active {% endif %} | {{ f.collector }} | {{ f.category }} |
|
{{ f.artifact or '—' }} | {{ f.created_at | relative_time }} | ▸ |
|
{# ----- LLM reasoning ----- #}
reasoning
{{ f.reasoning or '—' }}
remediation{% if resolved %} (already addressed){% endif %}
{{ f.remediation }}
behavioural context
{% if b %}
{% if b.novel %}
✦ novel
{% elif b.baseline_established %}
part of baseline
{% else %}
baseline still learning
{% endif %}
{% if b.first_seen %}first seen {{ b.first_seen | datetime_fmt }}{% endif %}
{% if b.times_seen %}seen in {{ b.times_seen }} cycle(s){% endif %}
{% if b.host_runs is not none %}host runs {{ b.host_runs }}{% endif %}
{% endif %}
{% if r %}
{% if r.exec_lineage %}
exec lineage
parent {{ r.exec_lineage.parent or '—' }}
· signed {{ r.exec_lineage.signed or 'unsigned' }}
{% endif %}
{% if r.listening_ports %}
listening
{{ r.listening_ports | join(', ') }}
{% endif %}
{% if r.outbound_flows %}
outbound flows
{% for fl in r.outbound_flows %}{{ fl.dst }}{% if fl.service %} ({{ fl.service }}){% endif %}{% if fl.packets %} · {{ fl.packets }}pkt{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% if r.remote_connections %}
connections
{{ r.remote_connections | join(', ') }}
{% endif %}
{% if r.dns_queries %}
dns
{{ r.dns_queries | join(', ') }}
{% endif %}
{% endif %}
collected data ({{ f.collector }})
content_hash: {{ f.content_hash[:16] }}…
judged: {{ f.created_at | datetime_fmt }} ({{ f.created_at | relative_time }}) {% if f.cost_usd %}· est. LLM cost ${{ "%.6f"|format(f.cost_usd) }}{% endif %} {% if f.last_seen_at %} last seen: {{ f.last_seen_at | datetime_fmt }} ({{ f.last_seen_at | relative_time }}) {% else %} last seen: never observed since judgement was first recorded {% endif %} |
|||||||