-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[owasp-modsecurity compatibility] SecAuditLogParts flags #1305
Comments
Thanks for raising this, by any chance, would you also be able to check how modsec v3 on nginx is behaving? It would be great if we could collect all three behaviors and then reason about the "right" behavior and see which engine requires fixes |
I'll try to do it soon |
I'm not sure why K doesn't print out rules on nginx, probably not implemented yet (at least v3 doc says that), but anyways this flag has clear documentation: |
And I can see the other inconsistency now, for none-json representation (not sure how to name it) in coraza, we don't print out A and Z sections. This config
You can see it with our http-example. But we should probably add it as a separate issue. |
Just linking this conversation #801 (comment) that should be related. We removed A and Z from being modeled in the code, but it does not necessarily mean that we can not still print them in the none-json / plan text representation |
So looking at the current implementation I'd say we just need to move this block to the upper case. I just compared coraza messages structure with nginx modsec3 and at first glance it looks a little bit different but matches mostly (I'll add mapping in the next comment).
|
Message structure comparison
Other difference I noticed: for For nginx modsec 3 for Screens nginx modsec 3 messages |
So, I'm ready to make changes for the related PR
|
The PR related to the issue is ready for review. |
If I'm fully getting the context, we have three issues. We should be able to isolate and address them individually:
Thank you! |
Hey @M4tteoP |
Description
It is opened as a bug cause current behavior already doesn't match OWASP modsec behavior. It was checked on Apache engine and the behavior is definitely different.
TLDR:
SecAuditLogParts
H - this part should contain messages
K - this part should contain rule
Steps to reproduce
To reproduce the behavior on apache modsec you need to run it and config with this config and this config
Expected result
Test in the PR should pass and H flag should be responsible for messages, K flag for rules.
Actual result
In coraza now it works different way
K flag allows you to see messages (look at tests I've attached below).
See the in the attachments apache modsec behavior.


H flag on (no K flag)
K flag on (no H flag)
both flags on
The text was updated successfully, but these errors were encountered: