-
Notifications
You must be signed in to change notification settings - Fork 6
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
Custom rule filter actions #303
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #303 +/- ##
==========================================
- Coverage 83.60% 83.59% -0.01%
==========================================
Files 137 137
Lines 6025 6041 +16
Branches 2842 2848 +6
==========================================
+ Hits 5037 5050 +13
- Misses 369 370 +1
- Partials 619 621 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-06-24 13:36:39 Comparing candidate commit 11a312a in PR branch Found 4 performance improvements and 6 performance regressions! Performance is the same for 9 metrics, 0 unstable metrics. scenario:ip_match_matcher.random
scenario:is_xss_matcher.random
scenario:lowercase_transformer.random
scenario:phrase_match_matcher.enforce_word_boundary.random
scenario:regex_match_matcher.case_insensitive_flag.random
scenario:regex_match_matcher.case_insensitive_option.random
scenario:regex_match_matcher.lowercase_transformer.random
scenario:regex_match_matcher.random
scenario:remove_nulls_transformer.random
scenario:ruleset_1.10.0.random
|
* Simplify and rename a few things * Add extra checks to ensure an action override must be a blocking action
This PR introduces support for custom exclusion filter actions, limited to rule filters only. The filter custom action allows overriding the "blocking" (i.e. block, redirect, monitor) action of a rule if the exclusion filter is evaluated positively. For example, when the following filter matches the given IP,
rule 1
is set toblock
:The precedence of rule filter actions is still
bypass > monitor > custom
.This feature is one of the two required for suspicious attacker blocking.
Related Jira: APPSEC-53545