diff --git a/CLAUDE.md b/CLAUDE.md index 8dd5b87..6047e2e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,8 +50,8 @@ Implemented investigation/response state: - Incident tracking groups snapshots by process lineage and time window and exposes `incident list/show/export`. - The dashboard is HTTPS-only, token-protected off loopback, and read-only. It - shows status, incidents, timelines, alerts, posture findings, event tail, and - dry-run response plans. + shows status, incidents, timelines, alerts, posture findings, event-rule + metadata, event tail, and dry-run response plans. - `respond plan ` builds read-only containment/recovery plans, persists CLI-generated plans under `response-plans/`, and appends `response-audit.log`. Dashboard/API plan previews do not write artifacts. diff --git a/README.md b/README.md index f776aaf..e9ea2ef 100644 --- a/README.md +++ b/README.md @@ -287,10 +287,11 @@ sudo systemctl enable --now enodia-sentinel-web saved on first run and printed in the startup line. Open `https://:8787/?token=…`. - **Read-only management**: incidents, timelines, alert inventory, posture - findings, event tail, and dry-run response plans. No commands are executed - from the browser. JSON + findings, event rule atlas, event tail, and dry-run response plans. No + commands are executed from the browser. JSON API at `/api/status`, `/api/incidents`, `/api/respond/plan/`, - `/api/posture`, `/api/alerts`, `/api/alerts/`, `/api/events`. + `/api/posture`, `/api/rules`, `/api/alerts`, `/api/alerts/`, + `/api/events`. CLI-generated response plans are saved for handoff/review under `/response-plans/`, with a JSONL trail in diff --git a/docs/COMMAND_REFERENCE.md b/docs/COMMAND_REFERENCE.md index 3f4b496..0e177de 100644 --- a/docs/COMMAND_REFERENCE.md +++ b/docs/COMMAND_REFERENCE.md @@ -322,9 +322,9 @@ HTTPS is mandatory. If `web_tls_cert` / `web_tls_key` are not configured, Sentinel creates a self-signed pair under `log_dir`; add a browser exception for that certificate or replace it with a private/local CA certificate. -The console exposes incidents, alert snapshots, posture findings, event tail, -and dry-run response plans. It remains read-only; response commands are displayed -for review but not executed from the browser. +The console exposes incidents, alert snapshots, posture findings, event-rule +metadata, event tail, and dry-run response plans. It remains read-only; response +commands are displayed for review but not executed from the browser. Expected use: `enodia-sentinel-web.service`. diff --git a/docs/SPECIFICATION.md b/docs/SPECIFICATION.md index 89660b4..ab87940 100644 --- a/docs/SPECIFICATION.md +++ b/docs/SPECIFICATION.md @@ -102,7 +102,7 @@ When a fresh alert survives cooldown, Sentinel writes: |---|---| | CLI | Run daemon, one-shot checks, baseline management, FIM checks, package DB checks, rootcheck, posture audit, incident review/export, triage, status/watchdog, and response planning. | | Logs | Durable local evidence under `/var/log/enodia-sentinel`. | -| Dashboard | HTTPS-only read-only web view for status, incidents, timelines, alert browsing, posture findings, event tail, and response-plan previews. | +| Dashboard | HTTPS-only read-only web view for status, incidents, timelines, alert browsing, posture findings, event-rule metadata, event tail, and response-plan previews. | | Push | ntfy, Pushover, and generic webhook notifications. | | Red-team harness | Safe drills for testing signatures and demos. | diff --git a/enodia_sentinel/static/dashboard.html b/enodia_sentinel/static/dashboard.html index b9b8bd8..33464bb 100644 --- a/enodia_sentinel/static/dashboard.html +++ b/enodia_sentinel/static/dashboard.html @@ -10,7 +10,8 @@ --bg:#0a0c0f; --ink:#d8dee7; --muted:#8590a3; --soft:#aeb7c7; --panel:#11151b; --panel2:#151b23; --rail:#0d1117; --line:#26313f; --accent:#22c7a9; --amber:#f2b84b; --red:#f06476; --blue:#61a8ff; - --ok:#56d364; --shadow:0 18px 48px rgba(0,0,0,.28); + --violet:#b68cff; --copper:#d8925b; --ok:#56d364; + --shadow:0 18px 48px rgba(0,0,0,.28); } *{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink); @@ -74,6 +75,21 @@ .event b{display:block;color:#fff} .event code,.cmd{display:block;margin-top:6px;padding:8px;background:#080a0d; border:1px solid var(--line);border-radius:6px;color:#cbd5e1;white-space:pre-wrap;word-break:break-word} + .rule-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px} + .rule-counts{display:flex;gap:7px;flex-wrap:wrap} + .rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px} + .rule-card{position:relative;overflow:hidden;border:1px solid var(--line); + border-radius:8px;background:linear-gradient(135deg,rgba(17,21,27,.98),rgba(10,12,15,.96)); + padding:12px 12px 12px 16px} + .rule-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent)} + .rule-card.syscall:before{background:var(--violet)} + .rule-card.exec:before{background:var(--copper)} + .rule-meta{display:flex;align-items:center;gap:8px;justify-content:space-between;margin-bottom:8px} + .rule-sid{font-size:12px;color:#fff} + .rule-msg{color:var(--ink);margin:8px 0 10px} + .cond{display:grid;grid-template-columns:98px 1fr;gap:6px;border-top:1px solid rgba(255,255,255,.06);padding-top:7px} + .cond dt{color:var(--muted);font-size:11px} + .cond dd{margin:0;color:var(--soft);font-size:11px;word-break:break-word} .action{border:1px solid var(--line);border-radius:8px;background:#0d1117;padding:11px;margin-bottom:10px} .action .head{display:flex;gap:8px;align-items:center;justify-content:space-between} .risk{font-size:10px;text-transform:uppercase;border:1px solid var(--line);border-radius:999px;padding:2px 7px;color:var(--muted)} @@ -120,11 +136,13 @@ +
+ @@ -137,7 +155,12 @@