summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-11-15 00:53:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-11-15 00:59:10 (GMT)
commit025b364871c7a78ac03652dc6e47ee29e38199a0 (patch)
treec1de132b05edbbe9ece40b6b5cff253cda10b733 /tests
parent50789d8c735178858411f67118bc73eb620f4e69 (diff)
Ban pattern count indexes sooner (from the grammar).
Diffstat (limited to 'tests')
-rw-r--r--tests/analysis/scan/fuzzing.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py
index 1bebdd3..1b9b25b 100644
--- a/tests/analysis/scan/fuzzing.py
+++ b/tests/analysis/scan/fuzzing.py
@@ -267,3 +267,23 @@ rule test {
'''
self.check_rule_failure(rule)
+
+
+ def testCountIndex(self):
+ """Ban pattern count indexes from the grammer."""
+
+ rule = '''
+rule test {
+
+ bytes:
+ $a = "1"
+
+ condition:
+ #*[0]
+
+}
+'''
+
+ with self.assertRaisesRegex(ValueError, 'Unable to create content scanner'):
+
+ scanner = ContentScanner(rule)