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

Enhanced logging [Issue #3107] #3139

Merged

Conversation

marcstern
Copy link
Contributor

In case too many keys, indicate this in the audit log

apache2/msc_json.c Show resolved Hide resolved
@airween
Copy link
Member

airween commented May 15, 2024

I see that you added a new "extra" line:

ModSecurity: JSON parsing error: More than 10 JSON keys [hostname "localhost"] [uri "/post"] [unique_id "ZkUWkhdCjBcNkeH57qvdrgAAAAA"]
ModSecurity: Warning. Match of "eq 0" against "REQBODY_ERROR" required. [file "/etc/modsecurity/modsecurity.conf"] [line "77"] [id "20
0002"] [msg "Failed to parse request body."] [data "JSON parsing error: More than 10 JSON keys"] [severity "CRITICAL"] [hostname "localhost"] [uri "/post"] [unique_id "ZkUWkhdCjBcNkeH57qvdrgAAAAA"]

The first line contains the cause and the second the triggered rule details (with the cause too).

It's good for me, just asking: do we need the first line? (it does not contain extra information)

Cc @kkrupka - is this what you would like to have?

@kkrupka
Copy link

kkrupka commented May 16, 2024

Perfect. Thanks!

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
21.9% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@marcstern
Copy link
Contributor Author

I didn't add any line, it's automatically added.
Should be the case before the change (except that it would be the generic message about the "callback").

@airween
Copy link
Member

airween commented May 16, 2024

I didn't add any line, it's automatically added. Should be the case before the change (except that it would be the generic message about the "callback").

Ok, thanks.

I'm going to merge it now - thank you. Then it closes #3107.

@airween airween merged commit 2b3d092 into owasp-modsecurity:v2/master May 16, 2024
40 of 41 checks passed
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

3 participants