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(transaction): data type prediction for lazy predictions #1194

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jptosso
Copy link
Member

@jptosso jptosso commented Nov 5, 2024

Predictive variable matching is designed to filter data types in rules, which allows us only to run the rule if the content is relevant. This improves performance

CRS and modsec agrees to be part of this
There are negative and positive filters
List of filters:

  • alphanumeric
  • uri
  • domain
  • numeric
  • boolean
  • unicode

Steps to build this:

  • Extend collection fields to support metadata
  • Add tag support at bootstrap to this metadata and validate it
  • Match this at transaction level
  • Support transformations and multimatch

cc @piyushroshan

To maintain regression, no new actions will be added and we are going to use tags, tag syntax should look like this:

SecRule ... \
  "id:1, tag:'filter:uri,!alphanumeric,boolean,!numeric'"

@jptosso jptosso requested a review from a team as a code owner November 5, 2024 11:17
@jptosso jptosso marked this pull request as draft November 5, 2024 11:17
@jcchavezs
Copy link
Member

CRS and modsec agrees to be part of this

Wonder if this is discussed somewhere or is there any link we could add

@fzipi
Copy link
Member

fzipi commented Nov 5, 2024

CRS and modsec agrees to be part of this

Wonder if this is discussed somewhere or is there any link we could add

It was proposed here at the lodge, and everyone agreed that it was a good idea. But yes we need to write at least a wiki page.

@piyushroshan
Copy link
Contributor

Negative filters are pending to be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants