Skip to content

Commit

Permalink
[Cortex XDR - IR] Fix multiple incidents pulled (#35811)
Browse files Browse the repository at this point in the history
* init

* init

* RN
  • Loading branch information
jlevypaloalto committed Aug 9, 2024
1 parent 0f5d065 commit 1243a19
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ def fetch_incidents(client, first_fetch_time, integration_instance, exclude_arti
next_run['incidents_from_previous_run'] = []

next_run['time'] = last_fetch
next_run['incidents_at_last_timestamp'] = new_incidents_at_last_timestamp
next_run['incidents_at_last_timestamp'] = new_incidents_at_last_timestamp or last_run.get('incidents_at_last_timestamp', [])

return next_run, incidents

Expand Down
4 changes: 2 additions & 2 deletions Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ def get_multiple_incidents_extra_data(self, gte_creation_time_milliseconds=0, li
assert 'XDR Incident 4' in result_2[1]['name']
assert last_run['incidents_at_last_timestamp'] == ['4']

# run empty test and assert last_run['incidents_at_last_timestamp'] is empty
# run empty test and assert last_run['incidents_at_last_timestamp'] stays the same
last_run, result_2 = fetch_incidents(
client=mock_client,
first_fetch_time='3 days',
Expand All @@ -1649,4 +1649,4 @@ def get_multiple_incidents_extra_data(self, gte_creation_time_milliseconds=0, li
max_fetch=0,
)

assert last_run['incidents_at_last_timestamp'] == []
assert last_run['incidents_at_last_timestamp'] == ['4']
6 changes: 6 additions & 0 deletions Packs/CortexXDR/ReleaseNotes/6_1_62.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Palo Alto Networks Cortex XDR - Investigation and Response

- Fixed an issue in which an incident was fetched multiple times.
2 changes: 1 addition & 1 deletion Packs/CortexXDR/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Cortex XDR by Palo Alto Networks",
"description": "Automates Cortex XDR incident response, and includes custom Cortex XDR incident views and layouts to aid analyst investigations.",
"support": "xsoar",
"currentVersion": "6.1.61",
"currentVersion": "6.1.62",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 1243a19

Please sign in to comment.