Skip to content

Commit

Permalink
Fix OWASP CRS for latest libmodsecurity from v3/master
Browse files Browse the repository at this point in the history
See this PR for details:
SpiderLabs/owasp-modsecurity-crs#995
  • Loading branch information
defanator committed Feb 21, 2018
1 parent e25973d commit 23b03d2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions states/nginx.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{% set release = salt['grains.get']('lsb_distrib_codename', 'yakkety') %}
{% set nginxver = salt['pillar.get']('versions:nginx') %}

include:
- owasp-crs

NGINX Package Repository:
pkgrepo.managed:
- humanname: NGINX Package Repository
Expand Down Expand Up @@ -48,3 +51,5 @@ NGINX service:
- file: /etc/nginx/nginx.conf
- file: /etc/nginx/modsec/main.conf
- file: /etc/nginx/modsec/modsecurity.conf
- require:
- OWASP CRS patch from PR 995 apply
15 changes: 15 additions & 0 deletions states/owasp-crs.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ Default crs-setup.conf:
- target: /etc/nginx/modsec/owasp-crs/crs-setup.conf.example
- require:
- OWASP CRS

OWASP CRS patch from PR 995:
file.managed:
- name: /etc/nginx/modsec/owasp-crs/995.patch
- source: https://github.com/SpiderLabs/owasp-modsecurity-crs/pull/995.patch
- source_hash: 767bb6156ce286f9d17069905feeac5f
- require:
- OWASP CRS

OWASP CRS patch from PR 995 apply:
cmd.run:
- name: cd /etc/nginx/modsec/owasp-crs/ && patch -p1 < 995.patch && touch 995.patch.applied
- unless: test -e /etc/nginx/modsec/owasp-crs/995.patch.applied
- require:
- OWASP CRS

0 comments on commit 23b03d2

Please sign in to comment.