8000 fix(rules): remove response body from logs by theMiddleBlue · Pull Request #3034 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(rules): remove response body from logs #3034

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

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

theMiddleBlue
Copy link
Contributor

Since the response body could contain personal/sensitive data, it should not be logged and stored anywhere.
A false positive intercepted by a rule could contain unwanted data on logs.

This PR removes all ctl:auditLogParts=+E from all rules

E: Intermediary response body (present only if ModSecurity is configured to intercept response bodies, and if the audit log engine is configured to record it. Intercepting response bodies requires SecResponseBodyAccess to be enabled). Intermediary response body is the same as the actual response body unless ModSecurity intercepts the intermediary response body, in which case the actual response body will contain the error message (either the Apache default error message, or the ErrorDocument page).

@RedXanadu
Copy link
Member
RedXanadu commented Nov 29, 2022

Did we come up with a policy for this? Several meetings ago (I guess a couple of months ago?), we agreed to define a policy of "when does CRS apply auditLogParts=+E to rules", as currently it is inconsistent.

Unless, of course, that decision has been made and the policy will be "CRS will never apply auditLogParts=+E" 🙂

If that is the policy then we will need to add it to the contribution guidelines and explain why, for future development/reference.

@theMiddleBlue
Copy link
Contributor Author

I really would love a policy for this. I remember that we talked about logging request and response body, but I can't remember if we come out with a decision. Maybe we can talk about this at the next meeting

@dune73
Copy link
Member
dune73 commented Nov 29, 2022

Negative. We talked about this a bit in issue chat July 2021 (https://github.com/coreruleset/project-chat-archive/blob/master/chat-archive-2021-07-19.md), scheduled for August 2021, but then only pointed to #2139 which I think is more limited.

@dune73
Copy link
Member
< 8000 a class="author Link--primary text-bold css-overflow-wrap-anywhere " show_full_name="false" data-hovercard-type="user" data-hovercard-url="/users/dune73/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/dune73">dune73 commented Nov 29, 2022

Personally, I think a general no response body in audit log makes sense, if we can provide a config item that will activate response body in audit logs.

Also people might have a setting of their own, so this takes a bit of thinking.

@fzipi
Copy link
Member
fzipi commented Dec 12, 2022

@dune73 @RedXanadu What's the decision here then?

@RedXanadu
Copy link
Member
RedXanadu commented Dec 12, 2022

@fzipi We still don't have a policy on how to approach this.

I'll add it as a "project discussion" item for January's meeting.


I personally think it makes sense to remove ctl:auditLogParts=+E everywhere, but it would be good to discuss and hear more about providing it as a config option to users, possible use cases where response body audit logging is required, etc.

@dune73
Copy link
Member
dune73 commented Dec 15, 2022

Thought about this again. I'm team @RedXanadu. Let's get rid of it and people can enable it themselves if they want to.

Reasoning: If you know there is an audit log, you know how to navigate it and you know to read it, then you are also able to write a rule to write it.
It's not core functionality for us and very hairy anyways. If somebody sees a need, then write a plugin.

@fzipi
Copy link
Member
fzipi commented Dec 28, 2022

Then this makes sense to me also. So provided four people (@theMiddleBlue, @RedXanadu, @dune73 and @fzipi) already said 👍 , let's merge this one.

Copy link
Member
@fzipi fzipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comments in the ticket, let's move forward with this one. Also, maybe adding a documentation follow up on CONTRIBUTING.md file about not using +E anymore?

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.

4 participants
0