coreruleset / modsecurity-crs-docker

Official ModSecurity Docker + Core Rule Set (CRS) images
https://coreruleset.org
Apache License 2.0
237 stars 62 forks source link

Add Modsecurity version to startup logging #222

Closed ne20002 closed 3 months ago

ne20002 commented 3 months ago

Hi Coming along with #3642 I wonder about the follwing output when starting owasp/modsecurity-crs:nginx container:

2024/04/04 16:11:33 [notice] 630#630: ModSecurity-nginx v1.0.3 (rules loaded inline/local/remote: 0/824/0)
2024/04/04 16:11:37 [notice] 1#1: ModSecurity-nginx v1.0.3 (rules loaded inline/local/remote: 0/824/0)
2024/04/04 16:11:37 [notice] 1#1: using the "epoll" event method
2024/04/04 16:11:37 [notice] 1#1: nginx/1.25.3
2024/04/04 16:11:37 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) 
2024/04/04 16:11:37 [notice] 1#1: OS: Linux 6.1.0-18-amd64

I am confused for my original issue. For this, may I suggest to add the Modsecurity version (which seems to be 3.0.12 now) to the logging at startup as seen in the first post? Just to be clear about it?

theseion commented 3 months ago

Hi @ne20002. I looked through the other issue and wasn't able to find anything that related to logging the version at startup. I'm not aware of an option in ModSecurity to log the ModSecurity version, do you have something in mind on how to do this? The only option I see right now is to print to stdout manually.

ne20002 commented 3 months ago

As seen in the log output on startup in the post above there are a log statements about nginx version and modesc-nginx? version. Having the modsec version printed would be helpful. From the current output I can't tell if it really is 3.0.12 or something else. I have no idea on how to do it.

airween commented 3 months ago

hi @ne20002,

Having the modsec version printed would be helpful. From the current output I can't tell if it really is 3.0.12 or something else.

I'm sure this would be a very helpful feature, but I think it's more a ModSecurity-nginx feature than the Docker image.

Would you open a new issue there. Thanks!

theseion commented 3 months ago

@ne20002 got you. I could do that but having ModSecurity do that would be better. Thanks @airween.

theseion commented 3 months ago

Created the issue: https://github.com/owasp-modsecurity/ModSecurity-nginx/issues/316.

airween commented 2 months ago

Please take a review: https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/319.