owasp-modsecurity / owasp-modsecurity/ModSecurity

lua m.log(2, "4444") where is the log message?

Open
#3,035 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Platform - Nginx
Dominant language
C++
Stars
9.8k
Forks
1.8k
Avg merge
2h 46m
Merged PRs (30d)
1

Description

docker run --privileged --rm -ti owasp/modsecurity-crs:3.3.5-nginx-alpine-202401080101

/etc/modsecurity.d # grep SecRule setup.conf
SecRuleScript "/tmp/2.lua" "id:23333,deny"

/etc/modsecurity.d/owasp-crs # cat /tmp/2.lua
function main()
    --error("4444")
    --print("4444")
    m.log(1,"4444")
    m.log(2,"4444")
    return nil;
end

I am sure lua script have been exectued, but i checked "console output"、"nginx error log", and can not found the log message "4444".

So where is the log message?

https://github.com/coreruleset/modsecurity-crs-docker/issues/185

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SecRuleScript entry in setup.conf and the /tmp/2.lua script from the reproduction. Run the provided ModSecurity CRS Docker command and trace where m.log output at levels 1 and 2 is routed relative to the container console and nginx error log. Done means identifying the actual log destination or documenting that the messages are not emitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, lua, nginx
Domain
observability, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.