Skip to content

Commit 81f935d

Browse files
content-botchrisbalmeryaakovpraisler
authored andcommitted
Feature/splunk/edit disposition (demisto#24520)
* Feature/splunk/edit disposition (demisto#24308) * Added support for changing notable disposition * Fixed accidental indentation change * Another indentation fix * Fixed typo and added argument information to README * Fixed validation error in release notes * Update Packs/SplunkPy/ReleaseNotes/3_0_9.md --------- Co-authored-by: Yaakov Praisler <[email protected]> * Updated docker image * updated docker - release notes * Update SplunkPy.yml * Update 3_0_9.md --------- Co-authored-by: Chris Balmer <[email protected]> Co-authored-by: Yaakov Praisler <[email protected]>
1 parent a3bed5b commit 81f935d

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

Packs/SplunkPy/Integrations/SplunkPy/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Run the ***splunk-reset-enriching-fetch-mechanism*** command and the mechanism w
146146
- The drilldown search, does not support Splunk's advanced syntax. For example: Splunk filters (**|s**, **|h**, etc.)
147147

148148
### Incident Mirroring
149-
**Imporatnt Notes***
149+
**Important Notes***
150150
- This feature is available from Cortex XSOAR version 6.0.0.
151151
- This feature is supported by Splunk Enterprise Security only.
152152
- In order for the mirroring to work, the *Incident Mirroring Direction* parameter needs to be set before the incident is fetched.
@@ -391,6 +391,7 @@ Update an existing notable event in Splunk ES.
391391
| comment | The comment to add to the notable events. | Required |
392392
| urgency | The urgency of the notable events. | Optional |
393393
| status | The status of the notable events. Can be 0 - 5, where 0 - Unassigned, 1 - Assigned, 2 - In Progress, 3 - Pending, 4 - Resolved, 5 - Closed. | Optional |
394+
| disposition | The disposition of the notable events. Can be one of the default options: True Positive - Suspicious Activity, Benign Positive - Suspicious But Expected, False Positive - Incorrect Analytic Logic, False Positive - Inaccurate Data, Other, Undetermined. Or you can specify custom dispositions as `disposition:#` where `#` is the number of the custom configured disposition on Splunk. | Optional |
394395

395396

396397
##### Context Output

Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
PROXIES = handle_proxy()
3232
TIME_UNIT_TO_MINUTES = {'minute': 1, 'hour': 60, 'day': 24 * 60, 'week': 7 * 24 * 60, 'month': 30 * 24 * 60,
3333
'year': 365 * 24 * 60}
34+
DEFAULT_DISPOSITIONS = {
35+
'True Positive - Suspicious Activity': 'disposition:1',
36+
'Benign Positive - Suspicious But Expected': 'disposition:2',
37+
'False Positive - Incorrect Analytic Logic': 'disposition:3',
38+
'False Positive - Inaccurate Data': 'disposition:4',
39+
'Other': 'disposition:5',
40+
'Undetermined': 'disposition:6'
41+
}
3442

3543
# =========== Mirroring Mechanism Globals ===========
3644
MIRROR_DIRECTION = {
@@ -2269,10 +2277,17 @@ def splunk_edit_notable_event_command(base_url: str, token: str, auth_token: str
22692277
if args.get('status'):
22702278
status = int(args['status'])
22712279

2280+
# Map the label to the disposition id
2281+
disposition = args.get('disposition', '')
2282+
if disposition:
2283+
if disposition in DEFAULT_DISPOSITIONS:
2284+
disposition = DEFAULT_DISPOSITIONS[disposition]
2285+
22722286
response_info = update_notable_events(baseurl=base_url,
22732287
comment=args.get('comment'), status=status,
22742288
urgency=args.get('urgency'),
22752289
owner=args.get('owner'), eventIDs=event_ids,
2290+
disposition=disposition,
22762291
auth_token=auth_token, sessionKey=session_key)
22772292

22782293
if 'success' not in response_info or not response_info['success']:

Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,18 @@ script:
376376
- informational
377377
- description: Notable event status. 0 - Unassigned, 1 - Assigned, 2 - In Progress, 3 - Pending, 4 - Resolved, 5 - Closed.
378378
name: status
379+
- name: disposition
380+
auto: PREDEFINED
381+
predefined:
382+
- True Positive - Suspicious Activity
383+
- Benign Positive - Suspicious But Expected
384+
- False Positive - Incorrect Analytic Logic
385+
- False Positive - Inaccurate Data
386+
- Other
387+
- Undetermined
388+
description: Disposition of the notable. If the more options exist on the server,
389+
specifying the disposition as `disposition:#` will work in place of choosing
390+
one of the default values from the list.
379391
description: Updates existing notable events in Splunk ES.
380392
execution: true
381393
name: splunk-notable-event-edit
@@ -610,7 +622,7 @@ script:
610622
- contextPath: Splunk.UserMapping.SplunkUser
611623
description: Splunk user mapping.
612624
type: String
613-
dockerimage: demisto/splunksdk-py3:1.0.0.46376
625+
dockerimage: demisto/splunksdk-py3:1.0.0.48191
614626
isfetch: true
615627
ismappable: true
616628
isremotesyncin: true

Packs/SplunkPy/ReleaseNotes/3_0_9.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
#### Integrations
3+
##### SplunkPy
4+
- Added the new argument *disposition* in the command ***splunk-notable-event-edit*** to support changing notable disposition.
5+
- Updated the Docker image to: *demisto/splunksdk-py3:1.0.0.48191*.

Packs/SplunkPy/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Splunk",
33
"description": "Run queries on Splunk servers.",
44
"support": "xsoar",
5-
"currentVersion": "3.0.8",
5+
"currentVersion": "3.0.9",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)