Skip to content

Commit

Permalink
fix: don't set PARANOIA by default as if conflicts with the other vars
Browse files Browse the repository at this point in the history
When `PARANOIA` and `BLOCKING_PARANOIA` are both set but
`DETECTION_PARANOIA` isn't, the detection paranoia level may be set to a
value smaller than the blocking paranoia, which triggers a rule that
checks for this situation. Since `PARANOIA` is deprecated, simply don't
set it by default.
  • Loading branch information
theseion committed Feb 26, 2025
1 parent fd3708b commit 4487dfc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ You can achieve the same results just by getting any version you want, and using
git clone https://github.com/coreruleset/coreruleset.git myrules
cd myrules
git checkout ac2a0d1
docker run -p 8080:8080 -ti -e PARANOIA=4 -v rules:/opt/owasp-crs/rules:ro --rm owasp/modsecurity-crs
docker run -p 8080:8080 -ti -e BLOCKING_PARANOIA=4 -v rules:/opt/owasp-crs/rules:ro --rm owasp/modsecurity-crs
```

## Quick reference
Expand Down Expand Up @@ -412,8 +412,8 @@ docker run \
-e MODSEC_AUDIT_LOG=/var/log/modsec_audit.log \
-e LOGLEVEL=warn \
-e ERRORLOG=/var/log/modsec_error.log \
-e PARANOIA=1 \
-e EXECUTING_PARANOIA=2 \
-e BLOCKING_PARANOIA=2 \
-e DETECTION_PARANOIA=2 \
-e ENFORCE_BODYPROC_URLENCODED=1 \
-e ANOMALY_INBOUND=10 \
-e ANOMALY_OUTBOUND=5 \
Expand Down
1 change: 0 additions & 1 deletion apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ ENV \
TIMEOUT=60 \
WORKER_CONNECTIONS=400 \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
ANOMALY_OUTBOUND=4 \
BLOCKING_PARANOIA=1
Expand Down
1 change: 0 additions & 1 deletion apache/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ ENV \
TIMEOUT=60 \
WORKER_CONNECTIONS=400 \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
ANOMALY_OUTBOUND=4 \
BLOCKING_PARANOIA=1
Expand Down
1 change: 0 additions & 1 deletion nginx/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ ENV \
SSL_VERIFY=off \
WORKER_CONNECTIONS=1024 \
# CRS specific variables
PARANOIA=1 \
ANOMALY_INBOUND=5 \
ANOMALY_OUTBOUND=4 \
BLOCKING_PARANOIA=1
Expand Down

0 comments on commit 4487dfc

Please sign in to comment.