diff --git a/Packs/Neosec/Integrations/Neosec/Neosec.py b/Packs/Neosec/Integrations/Neosec/Neosec.py index f4054783f55f..fe6780c8376c 100644 --- a/Packs/Neosec/Integrations/Neosec/Neosec.py +++ b/Packs/Neosec/Integrations/Neosec/Neosec.py @@ -159,12 +159,6 @@ def build_filter( return [{"name": name, "operator": operator, "value": value} for value in values] -def neosec_datetime_to_timestamp(date_str: str) -> int: - return int( - datetime.strptime(date_str, NEOSEC_DATE_FORMAT).replace(tzinfo=timezone.utc).timestamp() - ) - - def timestamp_to_neosec_datetime(timestamp: int) -> str: return datetime.utcfromtimestamp(timestamp).strftime(NEOSEC_DATE_FORMAT) @@ -273,10 +267,14 @@ def fetch_incidents( if incident_created_time <= last_fetch: continue + alert_timestamp = dateparser.parse(alert.get("timestamp")) # type: ignore + if not alert_timestamp: + raise ValueError("Alert's timestamp is not valid") + incident = { "name": alert["name"], "occurred": timestamp_to_datestring( - neosec_datetime_to_timestamp(alert["timestamp"]) * 1000, + int(alert_timestamp.timestamp() * 1000), date_format=DATE_FORMAT, is_utc=True, ), diff --git a/Packs/Neosec/Integrations/Neosec/Neosec.yml b/Packs/Neosec/Integrations/Neosec/Neosec.yml index 874776af1300..ca1c581972d7 100644 --- a/Packs/Neosec/Integrations/Neosec/Neosec.yml +++ b/Packs/Neosec/Integrations/Neosec/Neosec.yml @@ -119,7 +119,7 @@ script: script: "-" type: python subtype: python3 - dockerimage: demisto/python3:3.10.9.42476 + dockerimage: demisto/python3:3.10.10.47713 feed: false longRunning: false longRunningPort: false diff --git a/Packs/Neosec/ReleaseNotes/1_0_2.md b/Packs/Neosec/ReleaseNotes/1_0_2.md new file mode 100644 index 000000000000..5aa4292a0986 --- /dev/null +++ b/Packs/Neosec/ReleaseNotes/1_0_2.md @@ -0,0 +1,5 @@ + +#### Integrations +##### Neosec +- Fixed time formatting bug. +- Updated the Docker image to: *demisto/python3:3.10.10.47713*. diff --git a/Packs/Neosec/pack_metadata.json b/Packs/Neosec/pack_metadata.json index e12c79e09e6c..cfeaaa3a1b17 100644 --- a/Packs/Neosec/pack_metadata.json +++ b/Packs/Neosec/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Neosec", "description": "Utilize Neosec behavioral analytics to protect your API estate from OWSP top 10 vulnerabilities and suspicious user behavior.", "support": "partner", - "currentVersion": "1.0.1", + "currentVersion": "1.0.2", "author": "Neosec", "url": "", "email": "support@neosec.com",