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

Custom rules support #154

Merged
merged 15 commits into from
Mar 31, 2023
Merged

Custom rules support #154

merged 15 commits into from
Mar 31, 2023

Conversation

Anilm3
Copy link
Collaborator

@Anilm3 Anilm3 commented Mar 28, 2023

Custom rules support, some facts for the reviewer:

  • Custom rules live alongside standard rules.
  • Custom rules have precedence over ASM rules, however rules with side-effects still have precedence over rules without side-effects.
  • Custom rules are sufficient to instantiate the WAF.
  • Exclusion filters can affect custom rules.
  • Rule overrides can't affect custom rules.

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

Merging #154 (2a25610) into master (e40a3f4) will increase coverage by 0.01%.
The diff coverage is 46.93%.

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   64.94%   64.95%   +0.01%     
==========================================
  Files          64       64              
  Lines        3158     3179      +21     
  Branches     1429     1451      +22     
==========================================
+ Hits         2051     2065      +14     
+ Misses        314      308       -6     
- Partials      793      806      +13     
Flag Coverage Δ
waf_test 64.95% <46.93%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/collection.hpp 80.00% <0.00%> (-20.00%) ⬇️
src/context.hpp 69.56% <0.00%> (ø)
src/mkmap.hpp 49.09% <ø> (+10.90%) ⬆️
src/parser/specification.hpp 100.00% <ø> (+10.00%) ⬆️
src/rule.cpp 75.00% <ø> (-3.79%) ⬇️
src/ruleset_builder.hpp 85.71% <ø> (ø)
src/parser/parser_v1.cpp 25.25% <25.00%> (+0.51%) ⬆️
src/ruleset.hpp 46.66% <27.27%> (-22.57%) ⬇️
src/collection.cpp 66.66% <33.33%> (ø)
src/context.cpp 60.00% <40.00%> (-2.03%) ⬇️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Anilm3 Anilm3 marked this pull request as ready for review March 30, 2023 10:00
src/context.cpp Outdated Show resolved Hide resolved
src/rule.hpp Outdated Show resolved Hide resolved
src/ruleset.hpp Outdated Show resolved Hide resolved
src/ruleset.hpp Outdated Show resolved Hide resolved
src/ruleset_builder.cpp Outdated Show resolved Hide resolved
src/ruleset_builder.cpp Outdated Show resolved Hide resolved
@Anilm3 Anilm3 merged commit 1312c33 into master Mar 31, 2023
18 checks passed
@Anilm3 Anilm3 deleted the anilm3/custom_rules branch March 31, 2023 13:49
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.

None yet

4 participants