The body of waf.NewCoreRuleSet moves into newCoreRuleSet in internal/sww/waf.go, beside newAlertQueue and newRuleFiles. Its error is still wrapped with SWW_WAF_CORE_RULE_SET_EXCLUSIONS_FILE, then with "cannot use the Core Rule Set", as before.
waf exports no NewCoreRuleSet; the comment on waf.Params.CoreRuleSet no longer names it.
The internal/waf test helper builds the Core Rule Set with coreruleset.New in a new addCoreRuleSet, beside addCounters, while the mode is not off. No internal/waf test sets an exclusions file, so the helper does not repeat the check of that file while the mode is off.
The tests of that check were already in internal/sww/sww_test.go, so no test moves and no assertion changes.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/smallwebwaf/issues/434
- The body of `waf.NewCoreRuleSet` moves into `newCoreRuleSet` in `internal/sww/waf.go`, beside `newAlertQueue` and `newRuleFiles`. Its error is still wrapped with `SWW_WAF_CORE_RULE_SET_EXCLUSIONS_FILE`, then with "cannot use the Core Rule Set", as before.
- `waf` exports no `NewCoreRuleSet`; the comment on `waf.Params.CoreRuleSet` no longer names it.
- The `internal/waf` test helper builds the Core Rule Set with `coreruleset.New` in a new `addCoreRuleSet`, beside `addCounters`, while the mode is not off. No `internal/waf` test sets an exclusions file, so the helper does not repeat the check of that file while the mode is off.
The tests of that check were already in `internal/sww/sww_test.go`, so no test moves and no assertion changes.
Model: opus-5-5
The body of waf.NewCoreRuleSet moves into newCoreRuleSet in
internal/sww, beside the providers of the other parts; waf no longer
exports it. The waf test helper builds the Core Rule Set with
coreruleset.New while the mode is not off.
Model: opus-5-5
clawbot
self-assigned this 2026-11-19 17:51:06 +01:00
newCoreRuleSet in internal/sww now builds the Core Rule Set with the same off-mode exclusions check and the same error, internal/waf no longer exports NewCoreRuleSet, and no test assertion changed.
Model: opus-5-5
Verdict: PASS
Head: 9af2e03008e3fac42d0276e70cdcddcd7bdf5881
`newCoreRuleSet` in `internal/sww` now builds the Core Rule Set with the same off-mode exclusions check and the same error, `internal/waf` no longer exports `NewCoreRuleSet`, and no test assertion changed.
Model: opus-5-5
clawbot
merged commit 967ccdf75e into next2026-11-19 18:15:33 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #434
waf.NewCoreRuleSetmoves intonewCoreRuleSetininternal/sww/waf.go, besidenewAlertQueueandnewRuleFiles. Its error is still wrapped withSWW_WAF_CORE_RULE_SET_EXCLUSIONS_FILE, then with "cannot use the Core Rule Set", as before.wafexports noNewCoreRuleSet; the comment onwaf.Params.CoreRuleSetno longer names it.internal/waftest helper builds the Core Rule Set withcoreruleset.Newin a newaddCoreRuleSet, besideaddCounters, while the mode is not off. Nointernal/waftest sets an exclusions file, so the helper does not repeat the check of that file while the mode is off.The tests of that check were already in
internal/sww/sww_test.go, so no test moves and no assertion changes.Model: opus-5-5
Verdict: PASS
Head:
9af2e03008newCoreRuleSetininternal/swwnow builds the Core Rule Set with the same off-mode exclusions check and the same error,internal/wafno longer exportsNewCoreRuleSet, and no test assertion changed.Model: opus-5-5