Skip to content

Commit 23b03d2

Browse files
committed
Fix OWASP CRS for latest libmodsecurity from v3/master
See this PR for details: SpiderLabs/owasp-modsecurity-crs#995
1 parent e25973d commit 23b03d2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

states/nginx.sls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{% set release = salt['grains.get']('lsb_distrib_codename', 'yakkety') %}
33
{% set nginxver = salt['pillar.get']('versions:nginx') %}
44

5+
include:
6+
- owasp-crs
7+
58
NGINX Package Repository:
69
pkgrepo.managed:
710
- humanname: NGINX Package Repository
@@ -48,3 +51,5 @@ NGINX service:
4851
- file: /etc/nginx/nginx.conf
4952
- file: /etc/nginx/modsec/main.conf
5053
- file: /etc/nginx/modsec/modsecurity.conf
54+
- require:
55+
- OWASP CRS patch from PR 995 apply

states/owasp-crs.sls

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ Default crs-setup.conf:
1010
- target: /etc/nginx/modsec/owasp-crs/crs-setup.conf.example
1111
- require:
1212
- OWASP CRS
13+
14+
OWASP CRS patch from PR 995:
15+
file.managed:
16+
- name: /etc/nginx/modsec/owasp-crs/995.patch
17+
- source: https://github.com/SpiderLabs/owasp-modsecurity-crs/pull/995.patch
18+
- source_hash: 767bb6156ce286f9d17069905feeac5f
19+
- require:
20+
- OWASP CRS
21+
22+
OWASP CRS patch from PR 995 apply:
23+
cmd.run:
24+
- name: cd /etc/nginx/modsec/owasp-crs/ && patch -p1 < 995.patch && touch 995.patch.applied
25+
- unless: test -e /etc/nginx/modsec/owasp-crs/995.patch.applied
26+
- require:
27+
- OWASP CRS

0 commit comments

Comments
 (0)