Skip to content

[wip] feat: SecRxPreFilter#1589

Draft
M4tteoP wants to merge 2 commits intomainfrom
secrxprefilter
Draft

[wip] feat: SecRxPreFilter#1589
M4tteoP wants to merge 2 commits intomainfrom
secrxprefilter

Conversation

@M4tteoP
Copy link
Copy Markdown
Member

@M4tteoP M4tteoP commented Apr 2, 2026

Implements SecRxPreFilter directive to control @rx prefiltering (#1534) at runtime instead of compile time. This makes adoption easier, being able to enable it on a per-instance basis, without requiring a rebuild.
The coraza.rule.rx_prefilter build tag now only sets the default to On for testing purposes, so we are able to still test the whole test suite with the feature enabled.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f8b8891-71b7-4be2-883e-bd8c00a6954a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch secrxprefilter

Comment @coderabbitai help to get the list of available commands and usage tips.

@M4tteoP M4tteoP changed the title [wip] SecRxPreFilter [wip] feat: SecRxPreFilter Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.67%. Comparing base (5aa06ee) to head (92e5183).

Files with missing lines Patch % Lines
internal/seclang/directives.go 50.00% 2 Missing and 2 partials ⚠️
internal/operators/rxprefilter.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1589      +/-   ##
==========================================
- Coverage   86.70%   86.67%   -0.04%     
==========================================
  Files         179      178       -1     
  Lines        8800     8810      +10     
==========================================
+ Hits         7630     7636       +6     
- Misses        911      914       +3     
- Partials      259      260       +1     
Flag Coverage Δ
coraza.no_memoize 86.75% <79.16%> (-0.04%) ⬇️
coraza.rule.case_sensitive_args_keys 86.64% <79.16%> (-0.04%) ⬇️
coraza.rule.mandatory_rule_id_check 86.66% <79.16%> (-0.04%) ⬇️
coraza.rule.multiphase_evaluation 86.40% <79.16%> (-0.04%) ⬇️
coraza.rule.no_regex_multiline 86.62% <79.16%> (-0.04%) ⬇️
coraza.rule.rx_prefilter 86.67% <79.16%> (-0.03%) ⬇️
default 86.67% <79.16%> (-0.04%) ⬇️
examples+ 16.96% <20.83%> (-0.54%) ⬇️
examples+coraza.no_memoize 84.74% <79.16%> (+0.10%) ⬆️
examples+coraza.rule.case_sensitive_args_keys 84.73% <79.16%> (+0.10%) ⬆️
examples+coraza.rule.mandatory_rule_id_check 84.84% <79.16%> (+0.10%) ⬆️
examples+coraza.rule.multiphase_evaluation 86.40% <79.16%> (-0.04%) ⬇️
examples+coraza.rule.no_regex_multiline 84.66% <79.16%> (+0.11%) ⬆️
examples+coraza.rule.rx_prefilter 84.68% <79.16%> (-0.03%) ⬇️
examples+no_fs_access 84.18% <79.16%> (+0.12%) ⬆️
ftw 86.67% <79.16%> (-0.04%) ⬇️
no_fs_access 86.00% <79.16%> (-0.03%) ⬇️
tinygo 86.66% <79.16%> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jptosso
Copy link
Copy Markdown
Member

jptosso commented Apr 2, 2026

I love this

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