Skip to content

Commit 0af5bbf

Browse files
committed
Palo Alto. Switch operator contains --> ~= when field value has slash
1 parent 6973aa3 commit 0af5bbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uncoder-core/app/translator/platforms/palo_alto/renders/cortex_xsiam.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ def not_equal_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
6262
return f"({self.or_token.join([self.not_equal_modifier(field=field, value=v) for v in value])})"
6363
return f'{field} != "{self.apply_value(value)}"'
6464

65-
def contains_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
65+
def contains_modifier(self, field: str, value: Union[list, str]) -> str:
6666
if isinstance(value, list):
6767
return f"({self.or_token.join(self.contains_modifier(field=field, value=v) for v in value)})"
68+
if value.endswith("\\"):
69+
return f'{field} ~= ".*{self.apply_value(value, value_type=ValueType.regex_value)}.*"'
6870
return f'{field} contains "{self.apply_value(value)}"'
6971

7072
def endswith_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy