Host runtime
Docker Desktop 29.2.0 on macOS, aarch64
Original WAFWiki lab
A reproducible local smoke test for OWASP CRS with ModSecurity and NGINX, covering clean traffic, a SQLi-like lab request, evidence logs, and rollout caveats.

Evidence policy
WAFWiki separates verified smoke-test results from architecture diagrams and methodology notes. A smoke test proves one narrow local path; it does not claim full production readiness.
Environment
Docker Desktop 29.2.0 on macOS, aarch64
owasp/modsecurity-crs:nginx
sha256:5beec1cf50e9518821d11862b988809936b2abb43ed8a930a714130df39318ff
ModSecurity-nginx v1.0.4, libmodsecurity3 v3.0.16
OWASP CRS 3.3.10, blocking paranoia level 1
Upstream 127.0.0.1:18080, WAF 127.0.0.1:18081
Commands
python3 -m http.server 18080 --bind 127.0.0.1
# In the published lab we used a tiny JSON handler instead of serving a directory.The upstream responds locally before WAF routing is introduced.
docker run --rm -d --name wafwiki-crs-lab \
-p 127.0.0.1:18081:8080 \
-e BACKEND=http://host.docker.internal:18080 \
-e MODSEC_RULE_ENGINE=on \
-e BLOCKING_PARANOIA=1 \
-e ANOMALY_INBOUND=5 \
owasp/modsecurity-crs:nginxThe WAF container starts on localhost and proxies to the upstream demo service.
curl -H 'Host: lab.wafwiki.local' http://127.0.0.1:18081/health
curl -H 'Host: lab.wafwiki.local' 'http://127.0.0.1:18081/search?id=1%20or%201%3D1'The clean request returns 200. The SQLi-like lab request returns 403 with CRS rule evidence.
Observed result
Clean request
GET /health reached the upstream JSON service through the WAF path.
SQLi-like lab request
GET /search?id=1 or 1=1 was interrupted by the WAF.
Primary detection
CRS logged SQL Injection Attack Detected via libinjection.
Blocking decision
Inbound anomaly score reached the configured threshold of 5.
Clean request: http_code=200 total=0.009809
SQLi-like lab request: http_code=403 total=0.008503
ModSecurity-nginx v1.0.4 loaded 929 local rules.
libmodsecurity3 version 3.0.16 was reported at startup.
CRS message: SQL Injection Attack Detected via libinjection.
CRS blocking message: Inbound Anomaly Score Exceeded (Total Score: 5).Evidence context
The screenshot records the clean and SQLi-like HTTP outcomes, engine and connector versions, CRS detection message, and blocking rule without exposing unrelated local data.

Limitations
Related research