From 742f97ccc03daac6978d65bfe7e384e3425783b0 Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Fri, 1 Nov 2024 17:53:24 +0900 Subject: [PATCH] Add regression rules for test Copied from: - https://gist.githubusercontent.com/martinhsv/20705a36b7cfa8ff6d0dee0d4efce7e7/raw/faa96c7838b1fe972c1f0881efacbb440f9a4a5e/modsecurity-regression-rules.txt - https://gist.githubusercontent.com/martinhsv/20705a36b7cfa8ff6d0dee0d4efce7e7/raw/b9321f190eb0e81b98cb65a56db3d7e0a4f59314/modsecurity-regression-ip-list.txt diff --git a/test/test-cases/regression/operator-ipMatchFromFile.json b/test/test-cases/regression/operator-ipMatchFromFile.json index 4a225954..1eb4d44a 100644 --- a/test/test-cases/regression/operator-ipMatchFromFile.json +++ b/test/test-cases/regression/operator-ipMatchFromFile.json @@ -129,7 +129,7 @@ }, "rules":[ "SecRuleEngine On", - "SecRule REMOTE_ADDR \"@ipMatchFromFile https://gist.githubusercontent.com/martinhsv/20705a36b7cfa8ff6d0dee0d4efce7e7/raw/b9321f190eb0e81b98cb65a56db3d7e0a4f59314/modsecurity-regression-ip-list.txt\" \"id:1 --- test/modsecurity-regression-ip-list.txt | 2 ++ test/modsecurity-regression-rules.txt | 1 + 2 files changed, 3 insertions(+) create mode 100644 test/modsecurity-regression-ip-list.txt create mode 100644 test/modsecurity-regression-rules.txt diff --git a/test/modsecurity-regression-ip-list.txt b/test/modsecurity-regression-ip-list.txt new file mode 100644 index 0000000000..3a5eb37e69 --- /dev/null +++ b/test/modsecurity-regression-ip-list.txt @@ -0,0 +1,2 @@ +127.0.0.1 +8.8.4.4 diff --git a/test/modsecurity-regression-rules.txt b/test/modsecurity-regression-rules.txt new file mode 100644 index 0000000000..e9358b8dcd --- /dev/null +++ b/test/modsecurity-regression-rules.txt @@ -0,0 +1 @@ +SecRule REQUEST_FILENAME "@pmFromFile https://raw.githubusercontent.com/owasp-modsecurity/ModSecurity/refs/heads/v3/master/test/modsecurity-regression-ip-list.txt" "id:'123',phase:2,log,pass,t:none"