waf: heuristics pass facts through typed fields of decision (closes #442)
check / check (push) Failing after 16m24s

The tags, what observe mode would have done, the broken limit and the
three reputation flags are fields of decision, each naming what sets it.
The log line is written from them and from the lookup answer, and no
heuristic, ban note or alert reads it back. A ban's notes take the
request's method, Host and User-Agent from decision, since the report's
steps have no request to read them from.

Model: opus-5-5
This commit is contained in:
clawbot authored and sneak committed 2026-11-19 22:05:40 +00:00
1 parent 91444a37b3
commit 17bbea919a
11 files changed
+64 -40

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ func (r refusalLimit) check(
// What the client was sent, or in observe mode would have been.
status := rq.out.status
switch rq.line.WouldAction {
switch rq.wouldAction {
case requestlog.ActionBlockedByBlockRule,
requestlog.ActionBlockedByCoreRuleSet:
status = http.StatusForbidden