From 7e16fcd28b57c1614fcc7d4433441b5fb6f822f7 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 19 Nov 2026 09:12:59 +0000 Subject: [PATCH] sww: run TestMainRunsWAF's waf with the Core Rule Set off TestMainRunsWAF starts waf in a process of its own, past run, so its Core Rule Set stayed in block mode. On a busy host its inspection could pass waf's 500 ms limit for its checks, and the test's one question got 503 instead of 200. Model: opus-5-5 --- internal/sww/waf_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/sww/waf_test.go b/internal/sww/waf_test.go index ab825cf..280d62e 100644 --- a/internal/sww/waf_test.go +++ b/internal/sww/waf_test.go @@ -90,6 +90,7 @@ func TestMainRunsWAF(t *testing.T) { cmd := exec.CommandContext(t.Context(), binary) cmd.Stdout = out + // The Core Rule Set is off, for the reason run gives. cmd.Env = append(os.Environ(), "TZ="+zone, commandForMain+"="+wafCommand, @@ -97,7 +98,8 @@ func TestMainRunsWAF(t *testing.T) { stateDir+"="+dir, cacheDir+"="+dir, ruleFilesDir+"="+t.TempDir(), - lookupSource+"=off") + lookupSource+"=off", + "SWW_WAF_CORE_RULE_SET_MODE=off") exited := startProcess(t, cmd)