Skip to content

Commit 51a7370

Browse files
authored
Merge pull request #260 from S0obi/feature/add-note-on-chained-rule-fine-tunning
feat: add a note about fine tuning chained rules
2 parents 5e99dd9 + dc506be commit 51a7370

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

content/2-how-crs-works/2-3-false-positives-and-tuning.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ The different rule exclusion types and methods are summarized in the table below
122122
This table is available as a well presented, downloadable [Rule Exclusion Cheatsheet](https://www.netnea.com/cms/rule-exclusion-cheatsheet-download) from Christian Folini.
123123
{{% /notice %}}
124124

125+
{{% notice note %}}
126+
When using `SecRuleUpdateTargetById` and `ctl:ruleRemoveTargetById` with *chained rules*, target exclusions are only applied to the first rule in the chain. You can't exclude targets from other rules in the chain, depending on how the rule is written, you may have to remove the entire rule using `SecRuleRemoveById` or `ctl:ruleRemoveById`. This is a current limitation of the SecLang configuration language.
127+
{{% /notice %}}
128+
125129
{{% notice note %}}
126130
There's also a third group of rule exclusion directives and actions, the use of which is discouraged. As well as excluding rules "ById" and "ByTag", it's also possible to exclude "ByMsg" (`SecRuleRemoveByMsg`, `SecRuleUpdateTargetByMsg`, `ctl:ruleRemoveByMsg`, and `ctl:ruleRemoveTargetByMsg`). This excludes rules based on the message they write to the error log. These messages can be dynamic and may contain special characters. As such, trying to exclude rules by message is difficult and error-prone.
127131
{{% /notice %}}

0 commit comments

Comments
 (0)