Skip to content

Commit

Permalink
fix: prevent incidents time range control at fetch incidents (#33590) (
Browse files Browse the repository at this point in the history
…#33741)

Co-authored-by: Okan <okan.turksever@logsign.net>
Co-authored-by: Menachem Weinfeld <90556466+mmhw@users.noreply.github.com>
  • Loading branch information
3 people authored and MosheEichler committed Apr 7, 2024
1 parent 8f4b45c commit 07f399b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
19 changes: 9 additions & 10 deletions Packs/LogsignSiem/Integrations/LogsignSiem/LogsignSiem.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,17 @@ def fetch_incidents(client: Client, first_fetch: str, max_fetch: int, query: str
created_at_str = f"{datetime.strptime(incident['Time']['Generated'], LOGSIGN_INC_DATE_FORMAT).isoformat()}Z"
created_at_dt = datetime.strptime(created_at_str, DATE_FORMAT)

if created_at_dt > latest_created_time:
inc = {
'name': f"Logsign-{created_at_str}",
'occured': created_at_str,
'rawJSON': json.dumps(incident)
}
inc = {
'name': f"Logsign-{created_at_str}",
'occured': created_at_str,
'rawJSON': json.dumps(incident)
}

incidents.append(inc)
latest_created_time = created_at_dt
incidents.append(inc)
latest_created_time = created_at_dt

if len(incidents) >= max_fetch:
break
if len(incidents) >= max_fetch:
break

# Save the next_run as a dict with the last_fetch key to be stored
next_run = {'last_fetch': datetime.strftime(latest_created_time, DATE_FORMAT)}
Expand Down
3 changes: 3 additions & 0 deletions Packs/LogsignSiem/ReleaseNotes/1_0_13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### Integrations
##### LogsignSiem
- Fixed an issue with ***fetch incidents***, which caused the incidents not to be displayed.
2 changes: 1 addition & 1 deletion Packs/LogsignSiem/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Logsign SIEM",
"description": "Logsign SIEM provides to collect and store unlimited data, investigate and detect threats, and respond automatically.",
"support": "partner",
"currentVersion": "1.0.12",
"currentVersion": "1.0.13",
"author": "Logsign",
"url": " https://support.logsign.net/",
"email": "support@logsign.net",
Expand Down

0 comments on commit 07f399b

Please sign in to comment.