Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Fixing FP on plugins page #32

Merged
merged 5 commits into from
Mar 1, 2024
Merged

feat: Fixing FP on plugins page #32

merged 5 commits into from
Mar 1, 2024

Conversation

azurit
Copy link
Member

@azurit azurit commented Mar 1, 2024

Plugin descriptions contains lots of data (like changelogs, error messages and so on) that triggers our response body rules.

@azurit azurit requested a review from EsadCetiner March 1, 2024 12:46
@EsadCetiner
Copy link
Member

@azurit LGTM, but do you have any example payloads that you can add to the tests file?

@azurit
Copy link
Member Author

azurit commented Mar 1, 2024

@EsadCetiner I have an example data but not sure if it's suitable for a test for rule 953100 as it contains PHP error message (which is supposed to be blocked). It was part of the chanelog:

Fixed: Call to a member function get_meta() on null error on WooCommerce order received page (thanks [Dekadinious](https://github.com/Dekadinious))

Also, i'm not sure about rule 951240 which triggers on CRS 3 but does NOT trigger on CRS 4. Example data:

warnings</p>\x0a<p>=1.9=<br />\x0a* [Added] Donation link because I&#8217;m poor<br />\x0a* [Removed] errors and deprecating warnings</p>\x0a<p>=1.8.1=<br />\x0a* [Updated] Renamed function from ‚my_profile_update‘ to ‚apg_profile_update‘

I would include it in the exclusion rule with a comment that it is not a case anymore on CRS 4 and can be removed after we drop support for CRS 3. What do you think?

@EsadCetiner
Copy link
Member

@azurit I don't see a reason why you shouldn't, it's legitimete data that's being wrongfully blocked. I'd add a test for 951240 as well even if the false positive doesn't exist with CRSv4. @theseion and I have been thinking of rewriting false positive tests for rule exclusion plugins to check if no rules are being triggered against a set of payloads known to cause false positives. The idea came from reviewing a PR but I haven't explored the idea just yet.

@azurit azurit merged commit a87d492 into coreruleset:master Mar 1, 2024
3 checks passed
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.

2 participants