netsec-agent/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sirius DevOps ef7e584d27 http rules: make the LogQL prefilter a superset of classify()
`http-sqli` was unreachable end to end: the prefilter admitted only
`union select`, so boolean (`' OR '1'='1`, `%27%20OR%20…`) and time-based
(`sleep(`, `waitfor delay`) payloads were dropped in Loki before Python saw
them, and the canary passed because it used the one admitted shape.

The prefilter now carries the missing shapes as plain literals (a nested
`(?:...)` group made Loki's filter 10x slower, and re-ordering the alternation
measured 20-60 s, so the old block stays first and the additions append).
Over-match measured on 2026-11-27 06:00-07:00Z over 29 426 lines: 1 202 -> 1 548
lines/h (+29 %), 10-minute query 3.9 s. The extra lines are Forgejo browse URLs
that classify() drops; a calm 10-minute window of 394 admitted lines yields 0
findings.

Durability: tests/fixtures/attack-shapes.json is one table of 105 payload
shapes iterated by both tests - classify() must flag each one and
config.HTTP_LINE_FILTER must match its serialized access line. It fails with 44
dropped shapes on the old filter and passes now, so this class of drift (any
rule kind, not just sqli) cannot come back silently.

Docs also record the data-source limit the bug surfaced: Cloudflare collapses
dot-segments in the path, so `/../../etc/passwd` arrives as `/etc/passwd` and
path traversal is only detectable in a query string (or off-tunnel).
2026-11-27 03:13:16 -05:00
..
gateway-http-rules.md http rules: make the LogQL prefilter a superset of classify() 2026-11-27 03:13:16 -05:00