Add commands and scripts ↗
Adding commands and scripts to playbooks enables automating repetitive tasks and executing custom actions to enhance efficiency and streamline workflow processes.
If you want to add a script that is not yet adopted, Cortex XSIAM automatically installs the content pack containing the script. If the script requires an integration instance, you are prompted to configure one.
- From the Task Library pane, click Commands & Scripts.
-
Search for a specific script, or click an integration from the list.
If you click an integration, it expands to show all the scripts it includes.
If you require a custom script, use the Agentic Assistant with the Automation Engineer agent to leverage the Cortex Agentic built-in LLM to quickly and efficiently generate functional Python scripts from natural language prompts. For more information, see Create a script.
-
Hover over the script you want and drag it onto the playbook editor. The Task Details pane opens.
A green check mark next to the script indicates the script is adopted and the integration instance containing the script is configured.
You are notified if any relevant integration instances require updates. Once installed, you are prompted to configure integration instance settings.
-
If the content pack containing the script you want is not installed, it will automatically install. You then configure an integration instance, if required, by clicking Create an instance now.
If the script belongs to multiple content packs, select from a drop down list which one to install.
If you add the script and it requires an integration instance, Cortex XSIAM indicates you need to set up an integration to run the script.
If you do not have permission to download the script, contact your administrator for help. You can also filter by "show only configured" to show scripts you can use.
- In the integration instance settings pane, enter values for the settings fields.
- Click Save & Exit for the integration instance.
- Select the Task Type the script will be based on, either Standard Task or Conditional Task.
- Standard task: Use a Standard task when you want to perform a manual or automated action as part of a workflow, for example, when an analyst needs to confirm information or escalate a case.
- Conditional task: Use a Conditional task to validate conditions based on values or parameters and take appropriate direction in the playbook workflow.
- Configure the script or command settings as follows.
- Click OK.
- Connect the task you added by dragging and dropping a wire.
| Tab | Details |
|---|---|
| Inputs | Each script has its own set of input arguments (or none). You can set each argument to a specific value (by typing directly on the line under the argument name), or you can click the curly brackets to define a source field to populate the argument. NOTE The option to access attributes in the Unified Asset Inventory is relevant if you have a Cortex XSIAM Premium license. It is also included with any other Cortex XSIAM license that has the Cloud Posture Security or Cloud Runtime Security add-on. Commands you run in the War Room can automatically populate parameters such as region, account ID, and tags, based on asset data. Commands can reference UIA attributes for the relevant asset(s) in the issue context and use those attributes as input. The issue must contain the relevant The syntax to reference attributes in the UAI is |
| Outputs | Each script has its own set of output arguments (or none). |
| Mapping | Map the output from a playbook task directly to an issue field. The value for an output key populates the specified field per issue. This is a good alternative to using a task with the The output value is dynamic and is derived from the context at the time that the task is processed. As a result, parallel tasks that are based on the same output may return inconsistent results.
|
| Advanced | Includes the following fields.
|
| Details | Includes the following fields.
|
| On Error | Includes the following fields.
|