-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature request: adding severity in ModSecurityIntervention #2748
base: v3/master
Are you sure you want to change the base?
Feature request: adding severity in ModSecurityIntervention #2748
Conversation
Hello @FedericoHeichou , Could you describe more fully what you're hoping to achieve here. Perhaps a specific example that outlines the tangible benefit? |
Hello @martinhsv
As you can see it prints everything with the severity level NGX_LOG_ERROR. If I set in a rule that a transaction has a severity of DEBUG the connector should know the severity, so it can use it to handle own right log level. With the code committed the Modsecurity-nginx code could became
(I don't know if they uses the same level so we should check if the levels are the same but it is just an example) |
HI @FedericoHeichou , Ignore the source code for now. What I was really prompting for was a description of what the benefit is, or what the user-visible effect is. Suppose you have two rules, something like:
And the nginx config includes:
With your suggestion here, how would rules 1001 and 1002 be treated differently? What would look different as far as the admin is concerned? And how is this different from current functionality? |
With your example it now prints both 1001 and 1002 even though you set the logger level to "error" and the 1002 is "warning" and the nginx.conf asking to add to the error.log file only >= errors. |
I see. I can think of at least a couple of reasons to be hesitant about an approach like that.
|
|
Hi, I think would be very useful adding in
ModSecurityIntervention
aseverity
field populated by disruptivesevaluate
function.In this way a connector can use the
intervention.log
based theseverity
of the log.For example owasp-modsecurity/ModSecurity-nginx#274