turnstone/web
pyr0ball ca559b82f2 feat: cybersec zero-shot scoring pipeline (#9)
Second-pass cybersec classifier using DeBERTa-v3-base-mnli (already
cached — no download required). Runs after each anomaly scoring pass on
entries flagged by the anomaly scorer or with pattern matches.

Architecture:
- app/services/cybersec.py: zero-shot-classification pipeline with 5
  cybersec candidate labels (auth failure, privilege escalation, network
  intrusion, malware, data exfiltration). Writes ml_score/ml_label/
  ml_scored_at to log_entries; inserts high-confidence hits into
  detections with scorer='cybersec'.
- app/tasks/cybersec_scorer.py: async background task (same shape as
  anomaly_scorer.py).
- REST: GET/POST /turnstone/api/cybersec/status|run|detections.
  GET /turnstone/api/anomaly/detections now accepts scorer= filter.

Schema: ml_score, ml_label, ml_scored_at added to log_entries; scorer
column added to detections (idempotent migrations + DDL for both SQLite
and Postgres).

UI: Security Alerts view gains Source dropdown (All / Anomaly / Cybersec)
and cybersec scorer status badge. Label dropdown split into optgroups.

Deployment: TURNSTONE_CYBERSEC_MODEL/DEVICE/THRESHOLD vars added to
.env.example, docker-compose.yml, docker-standalone.sh.

Tests: 10 new tests — no model, no eligible entries, scoring, detection
creation, normal label suppression, threshold filtering, pattern-tag
filtering, idempotency, list filtering, scorer column filter.
416/416 passing.

Closes: #9
2026-06-10 01:03:25 -07:00
..
src feat: cybersec zero-shot scoring pipeline (#9) 2026-06-10 01:03:25 -07:00
index.html feat: Vue 3 frontend and FastAPI REST layer 2026-05-08 16:27:59 -07:00
package-lock.json feat: Vue 3 frontend and FastAPI REST layer 2026-05-08 16:27:59 -07:00
package.json feat: Alpha milestone — corpus management, upload ingest, harvester agent 2026-05-19 07:45:58 -07:00
tsconfig.json feat: Vue 3 frontend and FastAPI REST layer 2026-05-08 16:27:59 -07:00
uno.config.ts feat: dark/light theme — CSS variables, OS preference, toggle button 2026-05-09 16:20:07 -07:00
vite.config.ts feat: Vue 3 frontend and FastAPI REST layer 2026-05-08 16:27:59 -07:00