forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new core-script-run command (demisto#36249)
* core-script-run * add tests and rn * delete print * rn * pre-commit * remove xdr * ignore * add to yml * remove xdr * rm * rn * rn * Update Packs/Core/ReleaseNotes/3_0_63.md Co-authored-by: ShirleyDenkberg <[email protected]> * rn * Bump pack from version Core to 3.0.64. * Bump pack from version CortexXDR to 6.1.73. * Bump pack from version CortexXDR to 6.1.74. * Bump pack from version Core to 3.0.65. * Bump pack from version CortexXDR to 6.1.75. * Bump pack from version Core to 3.0.66. * core-run-script * fix rm * fix rn --------- Co-authored-by: ShirleyDenkberg <[email protected]> Co-authored-by: Content Bot <[email protected]>
- Loading branch information
1 parent
f502c0d
commit 9a7db26
Showing
13 changed files
with
317 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,5 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
f3322.net | ||
Clarizen | ||
Clarizen | ||
https://test_api.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1259,10 +1259,9 @@ Retrieves the status of the requested actions according to the action ID. | |
>**No entries.** | ||
|
||
### core-run-script | ||
### core-run-script (Deprecated) | ||
*** | ||
Initiates a new endpoint script execution action using a script from the script library. | ||
|
||
Deprecated. Use core-script-run instead. | ||
|
||
#### Base Command | ||
|
||
|
@@ -2723,4 +2722,95 @@ Builtin Roles with this permission includes: "Investigator", "Responder", "Privi | |
>|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| | ||
>| 5 | | | 1577276587937 | 5 'This alert from content TestXDRPlaybook' alerts detected by Checkpoint - SandBlast | | 4 | 1 | 4 | 0 | | medium | 1 | 1579290004178 | | This issue was solved in Incident number 192304 | medium | false | new | 1 | `https://some.xdr.url.com/incident-view/4` | | ||
>| 1 | [email protected] | [email protected] | 1576100096594 | 'test 1' generated by Virus Total - Firewall | | 1 | 1 | 3 | 0 | | medium | 0 | 1579237974014 | | | medium | false | new | 1 | `https://some.xdr.url.com/incident-view/3` | | ||
>| 2 | | | 1576062816474 | 'Alert Name Example 333' along with 1 other alert generated by Virus Total - VPN & Firewall-3 and Checkpoint - SandBlast | | 2 | 1 | 2 | 0 | | high | 0 | 1579288790259 | | | high | false | under_investigation | 1 | `https://some.xdr.url.com/incident-view/2` | ||
>| 2 | | | 1576062816474 | 'Alert Name Example 333' along with 1 other alert generated by Virus Total - VPN & Firewall-3 and Checkpoint - SandBlast | | 2 | 1 | 2 | 0 | | high | 0 | 1579288790259 | | | high | false | under_investigation | 1 | `https://some.xdr.url.com/incident-view/2` | ||
> | ||
### core-script-run | ||
|
||
*** | ||
Initiates a new endpoint script execution action using a script from the script library and returns the results. | ||
|
||
#### Base Command | ||
|
||
`core-script-run` | ||
|
||
#### Input | ||
|
||
| **Argument Name** | **Description** | **Required** | | ||
| --- | --- | --- | | ||
| incident_id | Allows linking the response action to the incident that triggered it. | Optional | | ||
| endpoint_ids | A comma-separated list of endpoint IDs. Can be retrieved by running the core-get-endpoints command. | Required | | ||
| script_uid | Unique identifier of the script. Can be retrieved by running the core-get-scripts command. | Required | | ||
| parameters | Dictionary containing the parameter name as key and its value for this execution as the value. For example, {"param1":"param1_value","param2":"param2_value"}. | Optional | | ||
| timeout | The timeout in seconds for this execution. Default is 600. | Optional | | ||
| polling_interval_in_seconds | Interval in seconds between each poll. Default is 10. | Optional | | ||
| polling_timeout_in_seconds | Polling timeout in seconds. Default is 600. | Optional | | ||
| action_id | The action ID for polling use. | Optional | | ||
| hide_polling_output | Whether to hide the polling result (automatically filled by polling). | Optional | | ||
| is_core | Is the command being called from a core pack. Default is True. | Optional | | ||
|
||
#### Context Output | ||
|
||
| **Path** | **Type** | **Description** | | ||
| --- | --- | --- | | ||
| Core.ScriptResult.action_id | Number | ID of the action initiated. | | ||
| Core.ScriptResult.results.retrieved_files | Number | Number of successfully retrieved files. | | ||
| Core.ScriptResult.results.endpoint_ip_address | String | Endpoint IP address. | | ||
| Core.ScriptResult.results.endpoint_name | String | Name of successfully retrieved files. | | ||
| Core.ScriptResult.results.failed_files | Number | Number of files failed to be retrieved. | | ||
| Core.ScriptResult.results.endpoint_status | String | Endpoint status. | | ||
| Core.ScriptResult.results.domain | String | Domain to which the endpoint belongs. | | ||
| Core.ScriptResult.results.endpoint_id | String | Endpoint ID. | | ||
| Core.ScriptResult.results.execution_status | String | Execution status of this endpoint. | | ||
| Core.ScriptResult.results.return_value | String | Value returned by the script in case the type is not a dictionary. | | ||
| Core.ScriptResult.results.standard_output | String | The STDOUT and the STDERR logged by the script during the execution. | | ||
| Core.ScriptResult.results.retention_date | Date | Timestamp in which the retrieved files will be deleted from the server. | | ||
|
||
#### Command example | ||
|
||
```!core-script-run endpoint_ids=111 script_uid=111 polling_timeout_in_seconds=1200 timeout=1200``` | ||
|
||
##### Context Example | ||
|
||
``` | ||
{ | ||
"Core.ScriptResult": [ | ||
{ | ||
"action_id": 1, | ||
"results": [ | ||
{ | ||
"retrieved_files" : 0, | ||
"_return_value": [], | ||
"standard_output": "" | ||
"domain" : "222", | ||
"endpoint_id" : "111", | ||
"endpoint_ip_address" : ["1.1.1.1"], | ||
"command" : "_return_value", | ||
"retention_date" : NULL, | ||
"command_output" : [], | ||
"endpoint_name" : "test", | ||
"failed_files" : 0, | ||
"execution_status" : "COMPLETED_SUCCESSFULLY", | ||
"endpoint_status" : "STATUS_010_CONNECTED" | ||
}, | ||
] | ||
} | ||
], | ||
"Core.ScriptRun": [ | ||
{ | ||
"action_id": 1, | ||
"endpoints_count": 1, | ||
"status": 1 | ||
} | ||
] | ||
} | ||
``` | ||
|
||
##### Human Readable Output | ||
|
||
>### Script Execution Results | ||
>| _return_value| domain | endpoint_id| endpoint_ip_address| endpoint_name| endpoint_status| execution_status| failed_files| retention_date| retrieved_files| standard_output| | ||
>|---|---|---|---|---|---|---|---|---|---|---| | ||
>||222|111|1.1.1.1|test|STATUS_010_CONNECTED|COMPLETED_SUCCESSFULLY|0||0|| | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
#### Integrations | ||
|
||
##### Investigation & Response | ||
|
||
- Added a polling command ***core-script-run***. | ||
- Deprecated the ***core-run-script*** command- Use ***core-script-run*** instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#### Integrations | ||
|
||
##### Palo Alto Networks Cortex XDR - Investigation and Response | ||
|
||
- Updated the CoreIRApiModule to handle ***core-script-run*** command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.