-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
88 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Timeout ${APACHE_TIMEOUT} | ||
LogLevel ${LOGLEVEL} | ||
ErrorLog ${ERRORLOG} | ||
ServerAdmin ${SERVERADMIN} | ||
|
||
<IfModule unixd_module> | ||
User ${USER} | ||
Group ${GROUP} | ||
</IfModule> | ||
|
||
<IfModule reqtimeout_module> | ||
RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 | ||
</IfModule> | ||
|
||
LoadModule security2_module /usr/local/apache2/modules/mod_security2.so | ||
|
||
Include /etc/modsecurity.d/setup.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash -e | ||
|
||
source /opt/modsecurity/activate-rules.sh | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ LABEL maintainer="Chaim Sanders <[email protected]>" | |
ARG COMMIT=v3.3/dev | ||
ARG BRANCH=v3.3/dev | ||
ARG REPO=SpiderLabs/owasp-modsecurity-crs | ||
ENV WEBSERVER=Nginx | ||
ENV PARANOIA=1 | ||
ENV ANOMALY_INBOUND=5 | ||
ENV ANOMALY_OUTBOUND=4 | ||
|
@@ -28,7 +27,8 @@ RUN apt-get update \ | |
&& sed -i /etc/modsecurity.d/modsecurity.conf \ | ||
-e 's/SecRuleEngine DetectionOnly/SecRuleEngine On/g' | ||
|
||
COPY docker-entrypoint.sh / | ||
COPY 3.3-nginx/docker-entrypoint.sh / | ||
COPY src/opt/modsecurity/activate-rules.sh /opt/modsecurity/ | ||
|
||
EXPOSE 80 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash -e | ||
|
||
source /opt/modsecurity/activate-rules.sh | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Original of the latest recommended version: | ||
# https://github.com/SpiderLabs/ModSecurity/blob/v3/master/modsecurity.conf-recommended | ||
|
||
SecRuleEngine ${MODSEC_RULE_ENGINE} | ||
SecRequestBodyAccess ${MODSEC_REQ_BODY_ACCESS} | ||
|
||
SecRequestBodyLimit ${MODSEC_REQ_BODY_LIMIT} | ||
SecRequestBodyNoFilesLimit ${MODSEC_REQ_BODY_NOFILES_LIMIT} | ||
SecRequestBodyInMemoryLimit 131072 | ||
SecRequestBodyLimitAction Reject | ||
|
||
SecPcreMatchLimit ${MODSEC_PCRE_MATCH_LIMIT} | ||
SecPcreMatchLimitRecursion ${MODSEC_PCRE_MATCH_LIMIT_RECURSION} | ||
|
||
SecResponseBodyAccess ${MODSEC_RESP_BODY_ACCESS} | ||
SecResponseBodyMimeType text/plain text/html text/xml | ||
SecResponseBodyLimit ${MODSEC_RESP_BODY_LIMIT} | ||
SecResponseBodyLimitAction ProcessPartial | ||
|
||
SecTmpDir /tmp/ | ||
SecDataDir /tmp/ | ||
|
||
SecAuditEngine RelevantOnly | ||
SecAuditLogRelevantStatus "^(?:5|4(?!04))" | ||
SecAuditLogParts ABIJDEFHZ | ||
SecAuditLogType Serial | ||
SecAuditLog /var/log/modsec_audit.log | ||
|
||
SecArgumentSeparator & | ||
SecCookieFormat 0 | ||
SecUnicodeMapFile unicode.mapping 20127 | ||
SecStatusEngine On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Allow custom rules to be specified in: | ||
# /opt/modsecurity/rules/{before,after}-crs/*.conf | ||
|
||
Include /etc/modsecurity.d/modsecurity.conf | ||
Include /etc/modsecurity.d/modsecurity-override.conf | ||
|
||
Include /etc/modsecurity.d/owasp-crs/crs-setup.conf | ||
Include /etc/modsecurity.d/owasp-crs/rules/*.conf |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters