Default the netblock and AS number anomaly thresholds (closes #410)
check / check (push) Successful in 6m7s
check / check (push) Successful in 6m7s
The alert-only thresholds per netblock and per AS number now have defaults that alert on obvious abuse alone: per netblock 1200 and 15000 requests a minute and an hour, 5G and 50G a minute and an hour; per AS number five times those. The AS number ones default to off while SWW_WAF_LOOKUP_SOURCE is off. The other scopes stay off. The README says to tune them to the site's traffic. Model: opus-5-5
This commit was merged in pull request #484.
This commit is contained in:
1 parent
8219664ad1
commit
23eaa869dd
8 files changed
+152
-33
No files matched your search
@@ -456,7 +456,9 @@ func (w *wafAndParts) banAbuseIPDBBlacklist(
|
||||
// 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.
|
||||
// Core Rule Set have their requests inspected by it. Likewise the anomaly thresholds
|
||||
// per netblock and per AS number are off unless env sets them, so that only the tests
|
||||
// of the anomaly thresholds count requests.
|
||||
func newWAF(
|
||||
t *testing.T,
|
||||
geojsURL string,
|
||||
@@ -486,6 +488,7 @@ func newWAFWith(
|
||||
settings[lookupSource] = off
|
||||
}
|
||||
|
||||
maps.Copy(settings, netAndASNThresholdsOff())
|
||||
maps.Copy(settings, env)
|
||||
|
||||
cfg, err := config.WAFFromEnvironment(configtest.Viper(settings))
|
||||
|
||||
Reference in new issue
Block a user