summaryrefslogtreecommitdiff
path: root/tests/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-08-07 00:32:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-08-07 00:32:09 (GMT)
commit1c5a0e67186def152536d9c506e2e6c3a3a265c5 (patch)
treea6f0828f39260c7a36a3055bc1b7c1435b8b5d9f /tests/analysis
parent293434ab6cb34f1ffb9ed2003a44d7f5aa4450cf (diff)
Reject any rule referencing itself as match condition
Diffstat (limited to 'tests/analysis')
-rw-r--r--tests/analysis/scan/fuzzing.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py
index d5fce4b..53227af 100644
--- a/tests/analysis/scan/fuzzing.py
+++ b/tests/analysis/scan/fuzzing.py
@@ -93,3 +93,18 @@ rule test {
'''
self.check_rule_failure(rule)
+
+
+ def testSelfReferencingRule(self):
+ """Reject any rule referencing itself as match condition."""
+
+ rule = '''
+rule test {
+
+ condition:
+ test
+
+}
+'''
+
+ self.check_rule_failure(rule)