Skip to content

Commit e1e56d8

Browse files
committed
add CRS regression tests with ftwrunner in CI
1 parent dc37de6 commit e1e56d8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/make-install.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,18 @@ jobs:
4343
- name: Install
4444
run: |
4545
sudo make V=1 install
46+
- name: Run CRS tests with ftwrunner
47+
if: runner.os == 'Linux'
48+
run: |
49+
sudo apt-get install -y libpcre2-dev libyaml-dev
50+
sudo ldconfig
51+
git clone --depth 1 -b feat/update-libcoraza-api https://github.com/ppomes/ftwrunner.git /tmp/ftwrunner
52+
cd /tmp/ftwrunner
53+
autoreconf --install
54+
./configure
55+
make
56+
git clone --depth 1 https://github.com/coreruleset/coreruleset.git /tmp/coreruleset
57+
printf 'SecRuleEngine On\nSecRequestBodyAccess On\nSecResponseBodyAccess On\nSecResponseBodyMimeType text/plain text/html text/xml application/json\nSecAction "id:900000,phase:1,nolog,pass,t:none,setvar:tx.blocking_paranoia_level=4,setvar:tx.detection_paranoia_level=4"\n' > coraza.conf
58+
printf 'include coraza.conf\ninclude /tmp/coreruleset/crs-setup.conf.example\ninclude /tmp/coreruleset/plugins/empty-before.conf\ninclude /tmp/coreruleset/rules/*.conf\ninclude /tmp/coreruleset/plugins/empty-after.conf\n' > coraza_includes.conf
59+
printf 'modsecurity_config: coraza_includes.conf\nftwtest_root: /tmp/coreruleset/tests/regression/tests\n' > ftwrunner.yaml
60+
./src/ftwrunner -e coraza || true

0 commit comments

Comments
 (0)