Skip to content

Commit

Permalink
Add script to download OWASP CRS v4 to run benchmark
Browse files Browse the repository at this point in the history
- Simplified clone & checkout of CRS repository
  • Loading branch information
eduar-hte committed Jun 2, 2024
1 parent cbd514b commit 790fbcc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 0 additions & 2 deletions test/benchmark/basic_rules.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Include "../../modsecurity.conf-recommended"

Include "owasp-v3/crs-setup.conf.example"
Include "owasp-v3/rules/*.conf"
5 changes: 1 addition & 4 deletions test/benchmark/download-owasp-v2-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#
#

git clone https://github.com/coreruleset/coreruleset.git owasp-v2
cd owasp-v2
git checkout 2.2.9 -b tag2.2.9
cd -
git clone -c advice.detachedHead=false --depth 1 --branch 2.2.9 https://github.com/coreruleset/coreruleset.git owasp-v2

echo 'Include "owasp-v2/base_rules/*.conf"' >> basic_rules.conf
echo 'Include "owasp-v2/optional_rules/*.conf"' >> basic_rules.conf
Expand Down
6 changes: 1 addition & 5 deletions test/benchmark/download-owasp-v3-rules.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash


git clone https://github.com/coreruleset/coreruleset.git owasp-v3
cd owasp-v3
git checkout v3.0.2 -b tag3.0.2
cd -
git clone -c advice.detachedHead=false --depth 1 --branch v3.0.2 https://github.com/coreruleset/coreruleset.git owasp-v3

echo 'Include "owasp-v3/crs-setup.conf.example"' >> basic_rules.conf
echo 'Include "owasp-v3/rules/*.conf"' >> basic_rules.conf
Expand Down
9 changes: 9 additions & 0 deletions test/benchmark/download-owasp-v4-rules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

git clone -c advice.detachedHead=false --depth 1 --branch v4.3.0 https://github.com/coreruleset/coreruleset.git owasp-v4

echo 'Include "owasp-v4/crs-setup.conf.example"' >> basic_rules.conf
echo 'Include "owasp-v4/rules/*.conf"' >> basic_rules.conf

echo "Done."

0 comments on commit 790fbcc

Please sign in to comment.