SearchIncidentsV2
Common Scripts Pack.#
This Script is part of theSearches Demisto incidents. A summarized version of this scrips is avilable with the summarizedversion argument.
#
PermissionsThis automation runs using the default Limited User role, unless you explicitly change the permissions. For more information, see the section about permissions here: https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.10/Cortex-XSOAR-Administrator-Guide/Automations
#
Script DataName | Description |
---|---|
Script Type | python3 |
Tags | Utility |
Cortex XSOAR Version | 5.0.0 |
#
Used InSample usage of this script can be found in the following playbooks and scripts.
- Endpoint Investigation Plan
- ExtraHop - Ticket Tracking
- Kaseya VSA 0-day - REvil Ransomware Supply Chain Attack
- MDE - False Positive Incident Handling
- MDE - True Positive Incident Handling
- Prisma Cloud Correlate Alerts v2
- Ransomware Enrich and Contain
- SafeBreach - Create Incidents per Insight and Associate Indicators
- SolarStorm and SUNBURST Hunting and Response Playbook
- Spring Core and Cloud Function SpEL RCEs
#
InputsArgument Name | Description |
---|---|
id | A comma-separated list of incident IDs by which to filter the results. |
name | A comma-separated list of incident names by which to filter the results. |
status | A comma-separated list of incident statuses by which to filter the results. For example: assigned. |
notstatus | A comma-separated list of incident statuses to exclude from the results. For example: assigned. |
reason | A comma-separated list of incident close reasons by which to filter the results. |
fromdate | Filter by from date (e.g. "3 days ago" or 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
todate | Filter by to date (e.g. "3 days ago" or 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
fromclosedate | Filter by from close date (e.g. 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
toclosedate | Filter by to close date (e.g. 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
fromduedate | Filter by from due date (e.g. 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
toduedate | Filter by to due date (e.g. 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z) |
level | Filter by Severity |
owner | Filter by incident owners |
details | Filter by incident details |
type | Filter by incident type |
query | Use free form query (use Lucene syntax) as filter. All other filters will be ignored when this filter is used. |
page | Filter by the page number (deprecated) |
trimevents | The number of events to return from the alert JSON. The default is 0, which returns all events. Note that the count is from the head of the list, regardless of event time or other properties. |
size | Number of incidents per page (per fetch) (deprecated) |
sort | Sort in format of field.asc,field.desc,... |
searchresultslabel | If provided, the value of this argument will be set under the searchResultsLabel context key for each incident found. |
summarizedversion | If enabled runs a summarized version of this script. Disables auto-extract, sets fromDate to 30 days, and minimizes the context output. You can add sepcific fields to context using the add_fields_to_summarize_context argument. Default is false. |
includeinformational | Supported only in XSIAM. When the value is set to 'True', informational severity alerts will return as part of the results. The ‘fromdate’ and ‘todate’ arguments must be provided to use this argument. The maximum value currently supported for the 'fromdate' argument to retrieve informational incidents is 5 hours. If a value greater than this is provided, it will be adjusted to 5 hours ago. To retrieve only informational incidents, use the query argument and include this limitation within the query. Default is false. |
limit | The maximum number of incidents to be returned. Default is 100. |
#
OutputsPath | Description | Type |
---|---|---|
foundIncidents.id | A list of incident IDs returned from the query. | Unknown |
foundIncidents.name | A list of incident names returned from the query. | Unknown |
foundIncidents.severity | A list of incident severities returned from the query. | Unknown |
foundIncidents.status | A list of incident statuses returned from the query. | Unknown |
foundIncidents.owner | A list of incident owners returned from the query. | Unknown |
foundIncidents.created | A list of the incident create date returned from the query. | Unknown |
foundIncidents.closed | A list of incident close dates returned from the query. | Unknown |
foundIncidents.labels | An array of labels per incident returned from the query. | Unknown |
foundIncidents.details | Details of the incidents returned from the query. | Unknown |
foundIncidents.dueDate | A list of incident due dates returned from the query. | Unknown |
foundIncidents.phase | A list of incident phases returned from the query. | Unknown |
foundIncidents.searchResultsLabel | The value provided in the searchresultslabel argument. | String |
#
Script Example!SearchIncidentsV2 name="Incident to search"
#
Context Example#
Human Readable Output#
Incidents foundid | name | severity | status | owner | created | closed |
---|---|---|---|---|---|---|
978 | Incident to search | 0 | 0 | admin | 2020-09-29T17:29:44.162034+03:00 | 0001-01-01T00:00:00Z |