Open
Conversation
Covers the plugin architecture change, introduces the plugin registry, maps all CRS 3 application exclusion packages to their CRS 4 plugin equivalents with rule ID ranges, installation methods, multi-app scoping, and new capability plugins. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The author is already shown from the front matter. Adds the related-pages shortcode to cross-link migration series posts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying website with
|
| Latest commit: |
aec151e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d286f75b.website-1u6.pages.dev |
| Branch Preview URL: | https://blog-crs-migration-part-3.website-1u6.pages.dev |
theseion
requested changes
Apr 3, 2026
| Include crs/plugins/*-after.conf | ||
| ``` | ||
|
|
||
| This load order matters. Rules in `*-before.conf` run before CRS has processed the request — this is where exclusion rules go, so they can suppress matching before CRS rules fire. Rules in `*-after.conf` run after CRS — this is where scoring rules that need to know the CRS result go. |
Contributor
There was a problem hiding this comment.
Suggested change
| This load order matters. Rules in `*-before.conf` run before CRS has processed the request — this is where exclusion rules go, so they can suppress matching before CRS rules fire. Rules in `*-after.conf` run after CRS — this is where scoring rules that need to know the CRS result go. | |
| This load order matters. Rules in `*-before.conf` run before CRS has processed the request — this is where exclusion rules go, so they can suppress matching before CRS rules fire. Rules in `*-after.conf` run after CRS — this is where rules go that need to know the CRS scoring result. |
| /path/to/crs/plugins/wordpress-rule-exclusions-plugin-config.conf | ||
| ``` | ||
|
|
||
| Review the config file for any options to set, then reload your WAF. |
Contributor
There was a problem hiding this comment.
Suggested change
| Review the config file for any options to set, then reload your WAF. | |
| Review the config and README files of the plugin for any options to set, then reload your WAF. |
|
|
||
| # Symlink each file into the CRS plugins directory | ||
| for f in /opt/crs-plugins/wordpress-rule-exclusions-plugin/plugins/*; do | ||
| ln -s "$f" /path/to/crs/plugins/ |
Contributor
There was a problem hiding this comment.
Suggested change
| ln -s "$f" /path/to/crs/plugins/ | |
| ln -s "${f}" /path/to/crs/plugins/ |
Comment on lines
+159
to
+162
| SecRule &TX:wordpress-rule-exclusions-plugin_enabled "@eq 0" \ | ||
| "id:9507010,phase:1,pass,nolog,chain" | ||
| SecRule WebAppID "!@streq wordpress" \ | ||
| "t:none,setvar:'tx.wordpress-rule-exclusions-plugin_enabled=0'" |
Contributor
There was a problem hiding this comment.
This wouldn't work if the plugin was enabled explicitly, i.e., <plugin>_enabled=1.
Suggested change
| SecRule &TX:wordpress-rule-exclusions-plugin_enabled "@eq 0" \ | |
| "id:9507010,phase:1,pass,nolog,chain" | |
| SecRule WebAppID "!@streq wordpress" \ | |
| "t:none,setvar:'tx.wordpress-rule-exclusions-plugin_enabled=0'" | |
| SecRule WebAppID "!@streq wordpress" \ | |
| "id:9507011,t:none,setvar:'tx.wordpress-rule-exclusions-plugin_enabled=0'" |
|
|
||
| ## Using Plugins on Multi-Application Reverse Proxies | ||
|
|
||
| If your WAF fronts multiple applications, you likely do not want WordPress exclusion rules to apply to requests going to your API or your phpBB forum. CRS 4 plugins support per-virtual-host scoping via `SecWebAppID` (ModSecurity) or the `Host` header (Coraza): |
Contributor
There was a problem hiding this comment.
Suggested change
| If your WAF fronts multiple applications, you likely do not want WordPress exclusion rules to apply to requests going to your API or your phpBB forum. CRS 4 plugins support per-virtual-host scoping via `SecWebAppID` (ModSecurity) or the `Host` header (Coraza): | |
| If your WAF fronts multiple applications, you likely do not want WordPress exclusion rules to apply to requests going to your API or your phpBB forum. CRS 4 plugins support per-virtual-host scoping via [`SecWebAppID`](https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v2.x%29#secwebappid) (and [`WEBAPPID`](https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v2.x%29#webappid) or the `Host` header (Coraza): |
| "t:none,setvar:'tx.wordpress-rule-exclusions-plugin_enabled=0'" | ||
| ``` | ||
|
|
||
| Most official plugins include this pattern commented out in their config file. Review each plugin's `*-config.conf` for the scoping example. |
Contributor
There was a problem hiding this comment.
Not true. Only the rule to conditionally disable a plugin is present in most plugins, not the scoping part.
Suggested change
| Most official plugins include this pattern commented out in their config file. Review each plugin's `*-config.conf` for the scoping example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.