]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
bug-4199: Add test for forum-reported issue 460/head
authorJeff Lucovsky <jeff@lucovsky.org>
Sat, 23 Jan 2021 20:26:33 +0000 (15:26 -0500)
committerVictor Julien <victor@inliniac.net>
Wed, 24 Feb 2021 13:26:58 +0000 (14:26 +0100)
tests/bug-4199-2/input.pcap [new file with mode: 0644]
tests/bug-4199-2/test.rules [new file with mode: 0644]
tests/bug-4199-2/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-4199-2/input.pcap b/tests/bug-4199-2/input.pcap
new file mode 100644 (file)
index 0000000..b72b4a7
Binary files /dev/null and b/tests/bug-4199-2/input.pcap differ
diff --git a/tests/bug-4199-2/test.rules b/tests/bug-4199-2/test.rules
new file mode 100644 (file)
index 0000000..cf09b90
--- /dev/null
@@ -0,0 +1,2 @@
+alert http any any -> any any (msg:"detect XSS #1)"; flow:established,to_server; http.request_body; url_decode; content:"("; nocase; fast_pattern; sid:1;)
+alert http any any -> any any (msg:"]detect XSS #2)"; flow:established,to_server; http.request_body; pcre:"/\b(fromcharcode|alert|eval)\s*/Pi"; sid:2;)
diff --git a/tests/bug-4199-2/test.yaml b/tests/bug-4199-2/test.yaml
new file mode 100644 (file)
index 0000000..9e77384
--- /dev/null
@@ -0,0 +1,18 @@
+requires:
+  min-version: 7
+
+args:
+- -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1
+
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2