@@ -26,14 +26,14 @@ class SumoLogicCSEBackend(TextQueryBackend):
2626 """
2727
2828 name : ClassVar [str ] = "Sumo Logic Cloud SIEM Backend"
29- formats : Dict [str , str ] = {
29+ formats : Dict [str , str ] = { # type: ignore[misc]
3030 "default" : "Sumo Logic CSIEM Rule JSON format" ,
3131 "cse_rule" : "CSIEM Rule JSON with full metadata" ,
3232 }
33- requires_pipeline : bool = True
33+ requires_pipeline : bool = True # type: ignore[misc]
3434
3535 # Cloud SIEM uses uppercase boolean operators
36- precedence : ClassVar [Tuple [ConditionItem , ConditionItem , ConditionItem ]] = (
36+ precedence : ClassVar [Tuple [ConditionItem , ConditionItem , ConditionItem ]] = ( # type: ignore[assignment]
3737 ConditionNOT ,
3838 ConditionAND ,
3939 ConditionOR ,
@@ -64,7 +64,7 @@ class SumoLogicCSEBackend(TextQueryBackend):
6464 wildcard_single : ClassVar [str ] = "*"
6565 add_escaped : ClassVar [str ] = "" # Don't add extra escaping
6666 filter_chars : ClassVar [str ] = ""
67- bool_values : ClassVar [Dict [bool , str ]] = {
67+ bool_values : ClassVar [Dict [bool , str ]] = { # type: ignore[assignment]
6868 True : "true" ,
6969 False : "false" ,
7070 }
@@ -79,7 +79,7 @@ class SumoLogicCSEBackend(TextQueryBackend):
7979 # Must escape / (delimiter), and common regex metacharacters when used as literals
8080 re_expression : ClassVar [str ] = "{field} matches /{regex}/"
8181 re_escape_char : ClassVar [str ] = "\\ "
82- re_escape : ClassVar [Tuple [str , ...]] = ("/" , "." )
82+ re_escape : ClassVar [Tuple [str , ...]] = ("/" , "." ) # type: ignore[assignment]
8383 re_escape_escape_char : bool = True
8484 re_flag_prefix : bool = False # CSE doesn't use flag prefixes in regex
8585 re_flags : Dict [SigmaRegularExpressionFlag , str ] = {
@@ -88,7 +88,7 @@ class SumoLogicCSEBackend(TextQueryBackend):
8888
8989 # Numeric comparison operators
9090 compare_op_expression : ClassVar [str ] = "{field} {operator} {value}"
91- compare_operators : ClassVar [Dict [SigmaCompareExpression .CompareOperators , str ]] = {
91+ compare_operators : ClassVar [Dict [SigmaCompareExpression .CompareOperators , str ]] = { # type: ignore[valid-type]
9292 SigmaCompareExpression .CompareOperators .LT : "<" ,
9393 SigmaCompareExpression .CompareOperators .LTE : "<=" ,
9494 SigmaCompareExpression .CompareOperators .GT : ">" ,
@@ -139,7 +139,7 @@ def __init__(
139139 ** kwargs ,
140140 ):
141141 super ().__init__ (processing_pipeline , collect_errors , ** kwargs )
142- self .rule_metadata = []
142+ self .rule_metadata : List [ Dict [ str , Any ]] = []
143143 self .min_confidence = min_confidence
144144 self .schema_path = schema_path
145145 self .include_confidence_metadata = include_confidence_metadata
@@ -224,7 +224,7 @@ def convert_condition_field_eq_val_num(self, cond, state: ConversionState) -> st
224224
225225 if not isinstance (cond , ConditionFieldEqualsValueExpression ):
226226 # Fallback to parent implementation
227- return super ().convert_condition_field_eq_val_num (cond , state )
227+ return super ().convert_condition_field_eq_val_num (cond , state ) # type: ignore[return-value]
228228
229229 field_name = cond .field
230230 numeric_value = cond .value .to_plain ()
@@ -253,7 +253,7 @@ def convert_condition_as_in_expression(self, cond, state: ConversionState) -> st
253253 from typing import Union , cast
254254
255255 if not all (isinstance (arg , ConditionFieldEqualsValueExpression ) for arg in cond .args ):
256- return super ().convert_condition_as_in_expression (cond , state )
256+ return super ().convert_condition_as_in_expression (cond , state ) # type: ignore[return-value]
257257
258258 field_name = cast (ConditionFieldEqualsValueExpression , cond .args [0 ]).field
259259
@@ -1165,7 +1165,7 @@ def _get_entity_selectors(self, logsource: Any) -> List[Dict[str, str]]:
11651165 Returns:
11661166 List of entity selector dictionaries (empty if cannot determine confidently)
11671167 """
1168- entity_selectors = []
1168+ entity_selectors : List [ Dict [ str , Any ]] = []
11691169
11701170 if not logsource :
11711171 return entity_selectors
0 commit comments