From: Philippe Antoine Date: Thu, 18 Apr 2024 12:57:46 +0000 (+0200) Subject: tests: add rule to check for http.response_body X-Git-Tag: suricata-6.0.19~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1791%2Fhead;p=thirdparty%2Fsuricata-verify.git tests: add rule to check for http.response_body Ticket: 6948 --- diff --git a/tests/rules/http_request_body/test.rules b/tests/rules/http_request_body/test.rules new file mode 100644 index 000000000..16e963bb5 --- /dev/null +++ b/tests/rules/http_request_body/test.rules @@ -0,0 +1 @@ +alert http any any -> any any (http.response_body; content:"one"; sid:1;) diff --git a/tests/rules/http_request_body/test.yaml b/tests/rules/http_request_body/test.yaml new file mode 100644 index 000000000..95fbc00fa --- /dev/null +++ b/tests/rules/http_request_body/test.yaml @@ -0,0 +1,23 @@ +requires: + min-version: 8 + pcap: false + +args: + - --engine-analysis + +checks: +- filter: + filename: rules.json + count: 1 + match: + id: 1 + mpm.buffer: "file_data" + mpm.pattern: "one" + # checks that all engines are toclient + engines[0].name: "file_data" + engines[0].direction: "toclient" + engines[0].app_proto: "http2" + engines[1].name: "file_data" + engines[1].direction: "toclient" + engines[1].app_proto: "http" + engines.__len: 2