netsec-scan: second-tick gate for web-port egress novelty (kill CDN churn)
One CI run produced 20 one-shot AWS/GitHub CDN destinations in a single 5-minute tick (21-line message, nothing reached the operator only because delivery was unresolved). First-seen tuples now carry per-tick observation counts in state: web ports (80/443/8080/8443) need two distinct ticks before alerting, non-web ports and any DROPPED verdict still alert on first sight. A beacon/exfil destination is retried; CDN rotation is not. Also: cron deliver switched to local because this profile has platforms.telegram.enabled=false (deliver=telegram errors 'no delivery target resolved'), and the README now documents that constraint.
This commit is contained in:
parent
c31d46a037
commit
be60d74159
6 changed files with 94 additions and 33 deletions
|
|
@ -244,7 +244,9 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|||
|
||||
seeding = not st.get("seeded")
|
||||
window_h = track_window(st, flows)
|
||||
new_egress = rules.rule_egress_first_seen(flows, st["seen"], _utcnow(), window_h)
|
||||
tick = int(st["totals"].get("ticks", 0)) + 1
|
||||
new_egress = rules.rule_egress_first_seen(
|
||||
flows, st["seen"], st["egress_counts"], _utcnow(), window_h, tick)
|
||||
beacon = rules.rule_beacon(flows, st["beacon"], now)
|
||||
rules.prune_beacon(st["beacon"], now)
|
||||
flow_findings = new_egress + beacon
|
||||
|
|
|
|||
Loading…
Reference in a new issue