]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
output: add test for suricata version in eve
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 3 Apr 2025 13:33:57 +0000 (15:33 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 7 Apr 2025 20:04:11 +0000 (22:04 +0200)
Ticket: 4853

tests/eve-suricata-version/README.md [new file with mode: 0644]
tests/eve-suricata-version/suricata.yaml [new file with mode: 0644]
tests/eve-suricata-version/test.yaml [new file with mode: 0644]

diff --git a/tests/eve-suricata-version/README.md b/tests/eve-suricata-version/README.md
new file mode 100644 (file)
index 0000000..78c913a
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Test eve output with suricata version
+
+## PCAP
+
+Reused from ethernet-eve test
+
+## Redmine Ticket
+
+https://redmine.openinfosecfoundation.org/issues/4853
diff --git a/tests/eve-suricata-version/suricata.yaml b/tests/eve-suricata-version/suricata.yaml
new file mode 100644 (file)
index 0000000..53e52d7
--- /dev/null
@@ -0,0 +1,15 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      suricata-version: yes
+      types:
+        - alert
+        - dns
+        - flow
+        - netflow
+        - tls
+        - http
+        - files
diff --git a/tests/eve-suricata-version/test.yaml b/tests/eve-suricata-version/test.yaml
new file mode 100644 (file)
index 0000000..8a782d3
--- /dev/null
@@ -0,0 +1,67 @@
+requires:
+   min-version: 8
+
+pcap: ../ethernet-eve/test.pcap
+
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 5
+      match:
+        event_type: dns
+        src_ip: 10.16.1.11
+        has-key: suricata_version
+        dns.type: request
+  - filter:
+      count: 5
+      match:
+        event_type: dns
+        src_ip: 10.16.1.11
+        has-key: suricata_version
+        dns.type: response
+  - filter:
+      count: 5
+      match:
+        event_type: flow
+        src_ip: 10.16.1.11
+        has-key: suricata_version
+  - filter:
+      count: 5
+      match:
+        event_type: netflow
+        src_ip: 10.16.1.11
+        has-key: suricata_version
+  - filter:
+      count: 5
+      match:
+        event_type: netflow
+        dest_ip: 10.16.1.11
+        has-key: suricata_version
+  - filter:
+      count: 4
+      match:
+        event_type: tls
+        src_ip: 192.168.56.1
+        has-key: suricata_version
+  - filter:
+      count: 5
+      match:
+        event_type: flow
+        app_proto: tls
+        src_ip: 192.168.56.1
+        has-key: suricata_version
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        src_ip: 192.168.118.10
+        has-key: suricata_version
+  - filter:
+      count: 1
+      match:
+        event_type: fileinfo
+        dest_ip: 192.168.118.10
+        has-key: suricata_version
+