Use existing scripts - Edit scripts to use in playbooks and run in the War Room. - Administrator Guide - Cortex XSIAM - Cortex - Security Operations

Cortex XSIAM Documentation

Product
Cortex XSIAM
Creation date
2024-03-06
Last date published
2025-12-29
Category
Administrator Guide
Abstract

Edit scripts to use in playbooks and run in the War Room.

Consider editing an existing script to leverage its functionality and save time and effort.

For example, scripts from the Base and Common Scripts content packs provide basic and reusable functions that can streamline your playbook development.

  1. Navigate to Incident ResponseAutomationScripts and in the Scripts Library search for the script you want to use.

    • Use free text in the search box to find an existing script. From the search drop down, you can:

      • Perform a basic search by Basic (name and tag), Name, or Tag.

      • Perform an advanced search for specific words In Script or Everywhere (including the script name and tags).

    • You can search for an exact match of the script name by putting quotation marks around the search text. For example, searching for "AddKeyToList" returns the script with that name. You can search for more than one exact match by including the logical operator "or" in-between your search texts in quotation marks. For example, searching for "AnalyzeTimestampIntervals" or "AddKeyToList" returns the two scripts with those names. Wildcards are not supported in free text search.

    • You can sort the scripts in the library alphabetically, by modified date, by system or custom, and you can filter for disabled or deprecated scripts.

    • The Script Helper also provides a list of available alphabetically ordered commands and scripts.

  2. Click Edit. If the script you want to use is locked, click three-dots.png and select either Duplicate Script or Detach Script.

    If a script is installed from a content pack, by default, the script is attached or locked, which means that it is not editable. To edit the script, you need to either make a copy or detach it. While the script is detached, it is not updated by the content pack. This may be useful when you want to update the script without breaking customization. If you want to update the script through content pack updates, you need to reattach it, but any changes are overridden by the content pack on upgrade. If you want to keep the changes, make a copy before reattaching.

  3. Edit the script code and settings as needed. For more information on script settings, see Create a script.