Commit graph netsec-agent/netsec_scan/__main__.py
Author SHA1 Message Date
sirius
c31d46a037 netsec-scan: honest observation window, /dropped tuples, report baseline counts
- first-seen egress is gated by the cumulative seen-set only (deleting a
  fingerprint re-arms the rule); the alert states the observed window
  (~20m / 3.2h / 2.1d) instead of implying the collector holds weeks.
- a DROPPED attempt on a new to-world tuple is keyed separately from forwarded
  traffic to the same destination and graded HIGH.
- daily report counts every external tuple seen that day, not just novel ones.
- drop-prune of the dead state['egress'] map; tests cover the single-fire rearm,
  day counters and the egress union.
- README: measured collector volume/tombstones/partial-tail behaviour, scheduler
  shim path.
2026-11-27 00:24:22 -05:00
sirius
68b2616cc5 netsec-scan: deterministic sensor (6 PromQL tripwires + 2 flow-store novelty rules)
Silent ticks (empty stdout, exit 0), one line per stable fingerprint, cumulative
union-only seen-set at ~/.hermes/cron/netsec-scan-state.json, memoized sensor-
degradation line, daily baseline report. Stdlib only; reads the collector's
JSONL over SSH with per-file byte offsets and Prometheus via the k8s API proxy.
40 unit tests against fixtures recorded from the live collector.
2026-11-27 00:20:46 -05:00