]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
bug-3616: New test with mixed file_data/transform rules
authorJeff Lucovsky <jeff@lucovsky.org>
Tue, 6 Oct 2020 12:24:48 +0000 (08:24 -0400)
committerJeff Lucovsky <jeff@lucovsky.org>
Sun, 8 Nov 2020 14:34:41 +0000 (09:34 -0500)
tests/bug-3616/input.pcap [new file with mode: 0644]
tests/bug-3616/input.rules [new file with mode: 0644]
tests/bug-3616/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-3616/input.pcap b/tests/bug-3616/input.pcap
new file mode 100644 (file)
index 0000000..cc069dc
Binary files /dev/null and b/tests/bug-3616/input.pcap differ
diff --git a/tests/bug-3616/input.rules b/tests/bug-3616/input.rules
new file mode 100644 (file)
index 0000000..c86ebef
--- /dev/null
@@ -0,0 +1,3 @@
+alert http any any -> any any (msg:"CANARY TEST #1"; file_data; content:"commonly-accepted commonly-used"; sid:1; rev:1;)
+alert http any any -> any any (msg:"strip_whitespace HTTP test #1"; flow:established; file_data; strip_whitespace; content:"bricks-and-clicks"; sid:2; rev:1;)
+alert tcp any any -> any any (msg:"strip_whitespace TCP test #1"; flow:established; file_data; strip_whitespace; content:"inventedtheterm"; sid:3; rev:1;)
diff --git a/tests/bug-3616/test.yaml b/tests/bug-3616/test.yaml
new file mode 100644 (file)
index 0000000..546ecc5
--- /dev/null
@@ -0,0 +1,19 @@
+requires:
+  min-version: 6
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 3