]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add tests for domain keyword
authorEric Leblond <el@stamus-networks.com>
Tue, 23 Aug 2022 14:29:07 +0000 (16:29 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 7 Apr 2025 20:04:17 +0000 (22:04 +0200)
tests/domain-keyword/input.pcap [new file with mode: 0644]
tests/domain-keyword/test.rules [new file with mode: 0644]
tests/domain-keyword/test.yaml [new file with mode: 0644]

diff --git a/tests/domain-keyword/input.pcap b/tests/domain-keyword/input.pcap
new file mode 100644 (file)
index 0000000..e11d35e
Binary files /dev/null and b/tests/domain-keyword/input.pcap differ
diff --git a/tests/domain-keyword/test.rules b/tests/domain-keyword/test.rules
new file mode 100644 (file)
index 0000000..7d612eb
--- /dev/null
@@ -0,0 +1,2 @@
+alert dns any any -> any any (msg:"dns suricata"; dns.query; domain; content:"suricata.io"; startswith; endswith; sid:1; rev:1;)
+alert dns any any -> any any (msg:"dns bbc"; dns.query; domain; content:"bbc.co.uk"; startswith; endswith; sid:2; rev:1;)
diff --git a/tests/domain-keyword/test.yaml b/tests/domain-keyword/test.yaml
new file mode 100644 (file)
index 0000000..4832fed
--- /dev/null
@@ -0,0 +1,8 @@
+requires:
+  min-version: 8.0.0
+
+checks:
+  - filter:
+      count: 1
+      match:
+        alert.signature_id: 1