Skip to content

Conversation

@touchweb-vincent
Copy link

@touchweb-vincent touchweb-vincent commented Nov 4, 2025

Hello,

what

This PR adds explicit warning notices to several rule-exclusion examples and documentation sections.
These notices remind users that:

  • Certain exclusions shown in examples are not safe to apply globally.
  • Such configurations must be used only in very specific contexts.
  • The examples are meant to illustrate syntax, not to recommend real-world use.
  • The goal is to make CRS documentation safer and more self-explanatory, reducing the risk of misconfiguration.

why

To help users avoid unsafe tuning practices that could compromise the effectiveness of CRS.

Some examples and documentation snippets may look harmless, but when reused without proper context they can lead to overly broad exclusions or rule bypasses.

Adding warnings provides clear guidance about when an example is for demonstration only, and when it should never be used in production.

@airween
Copy link
Contributor

airween commented Nov 4, 2025

@touchweb-vincent,

thanks for your PR - please make a bit more informative comment under the PR. For example, please see this. The two relevant questions are "why" and "what", with one-one sentences.

Thank you again.

@touchweb-vincent
Copy link
Author

@airween done, does this sound good to you ?

Copy link
Contributor

@airween airween left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a native English speaker so it's not the best idea to give a review, but I made a suggestion.

Cc: @theseion, @RedXanadu.

@airween
Copy link
Contributor

airween commented Nov 5, 2025

@airween done, does this sound good to you ?

Yes, excellent! Thank you!

```

{{% notice %}}
If, for optimization purposes, you need to use dynamic variables - for example, to efficiently filter Base64 variants - be aware that this directive supports dynamic variables, like so:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This notice is more confusing than helpful, I think. It's unclear to the reader, where the variable base64_ARGS comes from. I like the example though, so maybe transform this into a separate scenario, and include setting base64_ARGS.

Comment on lines 328 to 329
This type of broad exclusion must be avoided at all costs for most standard web application use cases.
In such contexts, you should never do this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This type of broad exclusion must be avoided at all costs for most standard web application use cases.
In such contexts, you should never do this.
Even though the decision in this example may seem trivial, rule exclusions _always_ carry a risk. It is important to understand the risk of disabling a rule, i.e., which attack vectors become available by disabling the rule, even if only a single target is affected.

@theseion
Copy link
Contributor

theseion commented Nov 8, 2025

Please work through the open comments @touchweb-vincent.

@touchweb-vincent
Copy link
Author

@theseion I was waiting for your point of view before committing the changes.

The changes have now been committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants