Skip to content

Commit fd340a0

Browse files
rshunimRotemAmit
andauthored
A small fix in CSP, FireEye, O365 for supporting python 3.12 (#38051)
* make the docstring a raw str * RN * add some more fixes * rn * rn --------- Co-authored-by: RotemAmit <[email protected]>
1 parent e8fca30 commit fd340a0

File tree

9 files changed

+23
-8
lines changed

9 files changed

+23
-8
lines changed

Packs/Base/ReleaseNotes/1_39_14.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#### Scripts
2+
3+
##### CommonServerPython
4+
5+
- Improved implementation.

Packs/Base/Scripts/CommonServerPython/CommonServerPython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6793,7 +6793,7 @@ def arg_to_datetime(arg, arg_name=None, is_utc=True, required=False, settings=No
67936793
ms = ms / 1000.0
67946794

67956795
if is_utc:
6796-
return datetime.utcfromtimestamp(ms).replace(tzinfo=timezone.utc)
6796+
return datetime.fromtimestamp(ms, tz=timezone.utc)
67976797
else:
67986798
return datetime.fromtimestamp(ms)
67996799
if isinstance(arg, str):
@@ -12650,7 +12650,7 @@ def function_runner(func, profiler, signal_event,
1265012650

1265112651

1265212652
def find_and_remove_sensitive_text(text, pattern):
12653-
"""
12653+
r"""
1265412654
Finds all appearances of sensitive information in a string using regex and adds the sensitive
1265512655
information to the list of strings that should not appear in any logs.
1265612656
The regex pattern can be used to search for a specific word, or a pattern such as a word after a given word.

Packs/Base/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Base",
33
"description": "The base pack for Cortex XSOAR.",
44
"support": "xsoar",
5-
"currentVersion": "1.39.13",
5+
"currentVersion": "1.39.14",
66
"author": "Cortex XSOAR",
77
"serverMinVersion": "6.0.0",
88
"url": "https://www.paloaltonetworks.com/cortex",

Packs/FireEyeHX/Integrations/FireEyeHXv2/FireEyeHXv2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ def parse_alert_to_incident(alert: Dict, pattern: Pattern) -> Dict:
16861686
indicator = event_values.get(event_indicator, '')
16871687

16881688
incident_name = '{event_type_parsed}: {indicator}'.format(
1689-
event_type_parsed=pattern.sub("\g<1> \g<2>", event_type).title(),
1689+
event_type_parsed=pattern.sub(r"\g<1> \g<2>", event_type).title(),
16901690
indicator=indicator
16911691
)
16921692

@@ -2580,7 +2580,7 @@ def get_alert_command(client: Client, args: Dict[str, Any]) -> List[CommandResul
25802580

25812581
event_type = alert.get('event_type')
25822582
event_type = event_type if event_type else "NewEvent"
2583-
event_type = re.sub("([a-z])([A-Z])", "\g<1> \g<2>", event_type).title()
2583+
event_type = re.sub("([a-z])([A-Z])", r"\g<1> \g<2>", event_type).title()
25842584
event_table = tableToMarkdown(
25852585
name=event_type,
25862586
t=alert.get('event_values')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#### Integrations
2+
3+
##### FireEye Endpoint Security (HX) v2
4+
5+
Improved implementation.

Packs/FireEyeHX/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "FireEye HX",
33
"description": "FireEye Endpoint Security is an integrated solution that detects and protects endpoints against known and unknown threats. The FireEye HX Cortex XSOAR integration provides access to information about endpoints, acquisitions, alerts, indicators, and containment. Customers can extract critical data and effectively operate the security operations automated playbooks.",
44
"support": "xsoar",
5-
"currentVersion": "2.3.17",
5+
"currentVersion": "2.3.18",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

Packs/MicrosoftExchangeOnline/Integrations/EWSO365/EWSO365.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ def handle_incorrect_message_id(message_id: str) -> str:
21652165
2. '\r\n\t<[message_id]>' --> '\r\n\t<message_id>'
21662166
If no necessary changes identified the original 'message_id' argument value is returned.
21672167
"""
2168-
if re.search("\<\[.*\]\>", message_id):
2168+
if re.search(r"\<\[.*\]\>", message_id):
21692169
# find and replace "<[" with "<" and "]>" with ">"
21702170
fixed_message_id = re.sub(r'<\[(.*?)\]>', r'<\1>', message_id)
21712171
demisto.debug('Fixed message id {message_id} to {fixed_message_id}')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#### Integrations
2+
3+
##### EWS O365
4+
5+
Improved implementation.

Packs/MicrosoftExchangeOnline/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Microsoft Exchange Online",
33
"description": "Exchange Online and Office 365 (mail)",
44
"support": "xsoar",
5-
"currentVersion": "1.5.24",
5+
"currentVersion": "1.5.25",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)