--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert tcp any any -> any any (msg:"invalid hex test rule"; content:"|l0 01 01|"; sid:12345; rev:1;)
--- /dev/null
+requires:
+ min-version: 5.0.0
+
+ features:
+ - HAVE_LIBJANSSON
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entres in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "Invalid hex code in content - |l0 01 01|, hex l. Invalidating signature."
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert tcp any any -> any any (msg:"invalid hex test rule"; content:"|01 10 0j|"; sid:12346; rev:1;)
--- /dev/null
+requires:
+ min-version: 5.0.0
+
+ features:
+ - HAVE_LIBJANSSON
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entres in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "Invalid hex code in content - \u0001\u00101 10 0j|, hex j. Invalidating signature."
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert tcp any any -> any any (msg:"invalid hex test rule 3"; content:"|1"; sid:1232222; rev:1;)
--- /dev/null
+requires:
+ min-version: 5.0.0
+
+ features:
+ - HAVE_LIBJANSSON
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entres in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "Invalid hex code assembly in content - |1. Invalidating signature."
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"