Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/nssec/modules/waf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,26 @@
ctl:ruleRemoveById=920420"

# ---- Phone provisioning config files (.cfg, .xml) ----
# Phones constantly fetch config files from /cfg/ - this is expected NDP behavior.
# Rule 920440 blocks .cfg extension by policy; exclude the entire /cfg/ path.
# Phones fetch config files from /cfg/ - this is expected NDP behavior.
# 920440: blocks .cfg extension by policy
# 951xxx: SQL leakage response rules hit PCRE limits on directory contact data
# Disable response body scanning for /cfg/ to avoid PCRE overhead on config responses.
SecRule REQUEST_URI "@beginsWith /cfg/" \\
"id:1000004,\\
phase:1,\\
pass,\\
nolog,\\
ctl:ruleRemoveById=920440"
ctl:ruleRemoveById=920440,\\
ctl:responseBodyAccess=Off"

# ---- Firmware downloads ----
# Phones fetch firmware from /frm/ - binary files must not be scanned.
SecRule REQUEST_URI "@beginsWith /frm/" \\
"id:1000007,\\
phase:1,\\
pass,\\
nolog,\\
ctl:responseBodyAccess=Off"

# ---- iNSight health checks ----
SecRule REQUEST_URI "@beginsWith /cfg/insight_healthcheck" \\
Expand Down