Default the netblock and AS number anomaly thresholds (closes #410)
check / check (push) Failing after 1m37s
check / check (push) Failing after 1m37s
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 is contained in:
1 parent
8219664ad1
commit
b8abb87738
7 files changed
+149
-32
No files matched your search
@@ -32,6 +32,22 @@ const (
|
||||
bytesPerHour = "BYTES_PER_HOUR"
|
||||
)
|
||||
|
||||
// netAndASNThresholdsOff returns the anomaly thresholds per netblock and
|
||||
// per AS number, the ones on by default, each set to off.
|
||||
func netAndASNThresholdsOff() map[string]string {
|
||||
settings := map[string]string{}
|
||||
|
||||
for _, scope := range []string{anomalyNet, anomalyASN} {
|
||||
for _, end := range []string{
|
||||
requestsPerMinute, requestsPerHour, bytesPerMinute, bytesPerHour,
|
||||
} {
|
||||
settings[scope+end] = off
|
||||
}
|
||||
}
|
||||
|
||||
return settings
|
||||
}
|
||||
|
||||
// The other anomaly settings.
|
||||
const (
|
||||
anomalyNetV4Prefix = "SWW_WAF_ANOMALY_NET_V4_PREFIX"
|
||||
|
||||
Reference in new issue
Block a user