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:
sirius 2026-11-27 00:32:25 -05:00
commit be60d74159
6 changed files with 94 additions and 33 deletions

View file

@ -94,6 +94,15 @@ destination (`…/dropped` in the entity, HIGH): a pod trying to reach a new hos
and being refused is a stronger signal than one that succeeded, and collapsing
them would hide it behind the forwarded tuple's fingerprint.
Rule 7 also keeps **web-port novelty** (80/443/8080/8443) on a second-tick gate:
a first-seen web destination is only worth a line once it appears in **two**
distinct ticks. Measured 2026-11-27: one CI run produced 20 one-shot AWS/GitHub
CDN destinations inside a single 5-minute window, which is a 20-line message and
exactly how a channel gets muted. CDN rotation is one-shot by nature; a beacon or
an exfil destination is retried, so it still fires — a tick later. Non-web ports
and any `DROPPED` verdict alert on first sight, and a `DROPPED` web-port tuple is
HIGH. Rationale and the two-tick evidence live in `config.EGRESS_WEB_MIN_TICKS`.
**Deliberately not implemented** (and why):
* **Per-workload PromQL rules.** The `pod` label on every `hubble_*` metric is