- FastAPI + htmx + Jinja2 web frontend, started with --web flag - JWT HS256 auth (WEB_SECRET_KEY) with httpOnly cookies; access (15 min) + refresh (7 day) tokens; refresh rotation + JTI revocation in data/web.db - RBAC: superadmin > admin > reader enforced per route - Live SSE dashboard fed by tui/events broadcast queue - Config editor: keyword groups and channel list saved to data/runtime_config.json and hot-reloaded in-process (scorer.reload_from_config, signal_channel_changed) - config.py migrated to load groups/channels from runtime_config.json; falls back to hardcoded defaults when file absent - tui/events.py: subscribe/unsubscribe broadcast, set_bot_context/signal_channel_changed - utils/scorer.py: import config as _config (fixes local binding); reload_from_config() - utils/database.py: count_by_severity, recent_for_domains, count_by_severity_for_domains - 53 new tests (events bus, JWT lifecycle, web DB CRUD, RBAC enforcement, config round-trip); total 141 passing
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ group.name }} — ULPgrammer{% endblock %}
|
|
{% block content %}
|
|
|
|
<h2>{{ group.name }}</h2>
|
|
|
|
<div class="stats-bar">
|
|
<span class="stat critical">🔴 CRITICAL: {{ counts.CRITICAL }}</span>
|
|
<span class="stat high">🟠 HIGH: {{ counts.HIGH }}</span>
|
|
<span class="stat medium">🟡 MEDIUM: {{ counts.MEDIUM }}</span>
|
|
<span class="stat low">🟢 LOW: {{ counts.LOW }}</span>
|
|
</div>
|
|
|
|
<details class="patterns-list">
|
|
<summary>Patterns ({{ group.patterns|length }})</summary>
|
|
<ul>
|
|
{% for p in group.patterns %}
|
|
<li><code>{{ p.regex }}</code> — {{ p.label }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
|
|
<h3>Recent hits</h3>
|
|
{% for hit in hits %}
|
|
<div class="hit-card sev-{{ hit.severity|lower }}">
|
|
<span class="sev-badge">{{ hit.severity }}</span>
|
|
<code class="raw">{{ hit.raw }}</code>
|
|
<span class="meta">{{ hit.source }} / {{ hit.filename }} — {{ hit.timestamp }}</span>
|
|
{% if hit.reasons %}
|
|
<ul class="reasons">{% for r in hit.reasons %}<li>{{ r }}</li>{% endfor %}</ul>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<p class="empty">No hits yet for this group.</p>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|