Core Rule Set: gitea's ordinary requests pass by default (closes #198)
check / check (push) Failing after 3m17s
check / check (push) Failing after 3m17s
The eighth change, internal/waf/gitea.conf, has the fields where gitea sends a search, a file name or a branch name skip the rules that refused ordinary gitea requests, on gitea's paths only. Referer skips 944130 too. A registry's layer reuse skips 932260 on from, the seventh change. The new setting SWWAF_CORE_RULE_SET_EXCLUSIONS_FILE loads an operator's own exclusions before the Core Rule Set's rules. A set file that cannot be read, does not parse or names smallwebwaf's own ids stops the start in every mode. A test sends the recorded gitea requests at the defaults, none refused, and three attacks, all refused. Model: opus-5-5
This commit is contained in:
@@ -463,6 +463,11 @@ func newServeWAFWith(
|
||||
}
|
||||
}
|
||||
|
||||
coreRuleSet, err := servewaf.NewCoreRuleSet(cfg)
|
||||
if err != nil {
|
||||
t.Fatalf("Core Rule Set: %v", err)
|
||||
}
|
||||
|
||||
server := build(servewaf.Params{
|
||||
Config: cfg,
|
||||
RequestLog: out,
|
||||
@@ -470,6 +475,7 @@ func newServeWAFWith(
|
||||
GeoJSURL: geojsURL,
|
||||
AbuseIPDBURL: abuseIPDBURL,
|
||||
LookupFile: lookupFile,
|
||||
CoreRuleSet: coreRuleSet,
|
||||
Now: now,
|
||||
Rules: ruleFiles,
|
||||
Alerts: alertQueue,
|
||||
|
||||
Reference in New Issue
Block a user