Repository: coreruleset/coreruleset

Issue:
Typos: Codespell report for v4-RC1
https://fossies.org/linux/www/coreruleset-4.0.0-rc1.tar.gz/codespell.html


Discussion:

Resolving patch:
diff --git a/util/change-version/change-version.py b/util/change-version/change-version.py
--- a/util/change-version/change-version.py
+++ b/util/change-version/change-version.py
@@ -30,7 +30,7 @@ def change_version(self, version, cversion):
                 if d['type'].lower() == "seccomponentsignature":
                     d['arguments'][0]['argument'] = version
 
-                # repace the versions in comments if cversion exists
+                # replace the versions in comments if cversion exists
                 if cversion is not None:
                     if d['type'].lower() == "comment" and self.re_cverpatt.search(d['argument']):
                         d['argument'] = re.sub(self.cverpatt, "ver.%s" % (cversion), d['argument'])
@@ -52,7 +52,7 @@ def __init__(self, **kwargs):
                 with open(f) as file:
                     data = file.read()
             except:
-                print("Exception catched - ", sys.exc_info())
+                print("Exception caught - ", sys.exc_info())
                 sys.exit(1)
 
             # build AST from content
@@ -81,7 +81,7 @@ def __init__(self, **kwargs):
                     mwriter.output.append("")
                     file.write("\n".join(mwriter.output))
             except:
-                print("Exception catched - ", sys.exc_info())
+                print("Exception caught - ", sys.exc_info())
                 sys.exit(1)
 
 if len(sys.argv) < 4:
diff --git a/util/crs-rules-check/rules-check.py b/util/crs-rules-check/rules-check.py
--- a/util/crs-rules-check/rules-check.py
+++ b/util/crs-rules-check/rules-check.py
@@ -141,7 +141,7 @@ def check_action_order(self):
         for d in self.data:
             if "actions" in d:
                 aidx = 0        # stores the index of current action
-                max_order = 0   # maximum position of readed actions
+                max_order = 0   # maximum position of read actions
                 if self.chained == False:
                     self.current_ruleid = 0
                 else:
diff --git a/util/find-rules-without-test/find-rules-without-test.py b/util/find-rules-without-test/find-rules-without-test.py
--- a/util/find-rules-without-test/find-rules-without-test.py
+++ b/util/find-rules-without-test/find-rules-without-test.py
@@ -29,7 +29,7 @@
 def find_ids(s, test_cases):
     """
         s: the parsed structure
-        test_cases: all avaliable test cases
+        test_cases: all available test cases
     """
     rids = {}
     for i in s:
@@ -41,7 +41,7 @@ def find_ids(s, test_cases):
                     # get the argument of the action
                     rid = int(a['act_arg']) # int
                     srid = a['act_arg']     # string
-                    if (rid%1000) >= 100:   # skip the PL controll rules
+                    if (rid%1000) >= 100:   # skip the PL control rules
                         # also skip these hardcoded rules
                         need_check = True
                         for excl in EXCLUSION_LIST:


Test patch:
diff --git a/tests/regression/tests/REQUEST-913-SCANNER-DETECTION/913102.yaml b/tests/regression/tests/REQUEST-913-SCANNER-DETECTION/913102.yaml
--- a/tests/regression/tests/REQUEST-913-SCANNER-DETECTION/913102.yaml
+++ b/tests/regression/tests/REQUEST-913-SCANNER-DETECTION/913102.yaml
@@ -1,7 +1,7 @@
 ---
 meta:
   author: airween
-  description: "Crawler User-Agents test - thist test does not need any negative case"
+  description: "Crawler User-Agents test - this test does not need any negative case"
   enabled: true
   name: 913102.yaml
 tests:
diff --git a/tests/regression/tests/REQUEST-949-BLOCKING-EVALUATION/949110.yaml b/tests/regression/tests/REQUEST-949-BLOCKING-EVALUATION/949110.yaml
--- a/tests/regression/tests/REQUEST-949-BLOCKING-EVALUATION/949110.yaml
+++ b/tests/regression/tests/REQUEST-949-BLOCKING-EVALUATION/949110.yaml
@@ -75,7 +75,7 @@ tests:
           output:
             log_contains: "id \"949110\""
   - test_title: 949110-4
-    desc: Test is basically identical to 949110-0 (see above) but here we assert that the scores are summed up and reported propperly
+    desc: Test is basically identical to 949110-0 (see above) but here we assert that the scores are summed up and reported properly
     stages:
       - stage:
           input:
diff --git a/tests/regression/tests/RESPONSE-951-DATA-LEAKAGES-SQL/951240.yaml b/tests/regression/tests/RESPONSE-951-DATA-LEAKAGES-SQL/951240.yaml
--- a/tests/regression/tests/RESPONSE-951-DATA-LEAKAGES-SQL/951240.yaml
+++ b/tests/regression/tests/RESPONSE-951-DATA-LEAKAGES-SQL/951240.yaml
@@ -6,7 +6,7 @@ meta:
   description: "Regression tests for rule 951240"
 tests:
   - test_title: 951240-0
-    desc: "Matching PostgresSQL Information Leakage"
+    desc: "Matching PostgreSQL Information Leakage"
     stages:
       - stage:
           input:
diff --git a/tests/regression/tests/RESPONSE-959-BLOCKING-EVALUATION/959100.yaml b/tests/regression/tests/RESPONSE-959-BLOCKING-EVALUATION/959100.yaml
--- a/tests/regression/tests/RESPONSE-959-BLOCKING-EVALUATION/959100.yaml
+++ b/tests/regression/tests/RESPONSE-959-BLOCKING-EVALUATION/959100.yaml
@@ -52,7 +52,7 @@ tests:
           output:
             no_log_contains: "id \"959100\""
   - test_title: 959100-2
-    desc: Test is basically identical to 959100-0 (see above) but here we assert that the scores are summed up and reported propperly
+    desc: Test is basically identical to 959100-0 (see above) but here we assert that the scores are summed up and reported properly
     stages:
       - stage:
           input: