waf: test the blacklist through the server's own wiring

No test fetched the blacklist through the server: the waf tests handed
clients to the ban code directly, so a wrong key, threshold or URL in
newReputation, or no Blacklisted at all, left every test green.

Model: opus-5-5
This commit is contained in:
clawbot committed 2026-11-19 08:47:57 +00:00
1 parent 20d069782e
commit da6667957f
3 files changed
+60 -9

No files matched your search

+4 -1
View File
@@ -424,7 +424,8 @@ func startRProxy(
// With no geojsURL, there is no stand-in for GeoJS to look clients up at, and
// SWW_WAF_LOOKUP_SOURCE is off unless env sets it. While it is file, the lookup
// database SWW_WAF_LOOKUP_DB_PATH names is read. Clients are checked with AbuseIPDB
// at abuseIPDBURL while env sets SWW_WAF_ABUSEIPDB_KEY.
// at abuseIPDBURL while env sets SWW_WAF_ABUSEIPDB_KEY, and its blacklist is
// fetched from abuseIPDBBlacklistURL.
// SWW_WAF_CORE_RULE_SET_MODE is off unless env sets it, so that only the tests of the
// Core Rule Set have their requests inspected by it.
func newWAF(
@@ -510,6 +511,8 @@ func newWAFWith(
Now: now,
Rules: ruleFiles,
Alerts: alertQueue,
AbuseIPDBBlacklistURL: abuseIPDBBlacklistURL,
})
// The race detector and a busy host can slow the Core Rule Set's