Playbook configuration

更新时间:
复制 MD 格式

A playbook is a predefined logical flow or script that identifies, classifies, evaluates, and responds to security events. It outlines the steps for performing specific operations, determining if a security threat exists, and defining the appropriate response and mitigation. You can customize and configure playbooks for security event types and severity levels. Response orchestration uses playbooks to make your security response more efficient and consistent.

Core concepts

Playbook types

Security Center provides two types of playbooks:

  • Predefined Playbook: Security Center includes built-in playbooks that are based on common security threat scenarios and solutions. You can use these playbooks directly without any configuration. You can also copy a predefined playbook to create a custom one, which you can then modify to suit your needs. This simplifies creating custom playbooks.

  • Custom Playbook: For complex and highly personalized security threat scenarios, Security Center provides flexible custom playbooks. You can use the flow editor to freely configure various components and easily implement automated security response solutions.

Playbook parameters

  • Input parameters define the conditions that trigger a playbook. Selecting different conditions updates the corresponding debugging parameter examples.

  • Output parameters: These are the fields generated when a playbook runs. Subsequent nodes can use these fields. You can also use the setOutput action to allow other playbooks to reference them. The syntax is ${event.parameter_path}.

    Note

    In addition to custom output parameters, the system provides default system parameters. For more information, see System parameters in playbooks.

Custom playbook workflow

image

Flow editor

Use the visual flow editor to create, modify, debug, and publish playbooks. The following table describes the main areas of the flow editor.

剧本编辑

Number

Description

1-Menu bar

  • Save: After you edit a playbook on the canvas, click Save to save the current playbook as a draft version.

    Important
    • If you exit without saving, your edits will be lost.

    • A draft version is temporary. If you roll back to a published version, the draft is overwritten. To save the playbook permanently, click Save and Publish.

  • Publish: Publishes the playbook as a published version. You can view the playbook's version information on its details page.

    Note

    You can use only published playbooks in automatic response rules and event handling.

  • Debug: In the debugging area at the bottom of the page, you can enter parameters to test if the playbook runs correctly. This helps you adjust the flow configuration.

    Breakpoint debugging: When you edit a component on the canvas, you can select the component and click the 断点调试 icon to add a breakpoint. During debugging, the system runs only the upstream nodes of the component with the breakpoint.

  • Check: Checks if the playbook has any issues. You can publish a playbook only if no issues are found.

  • View Published Version: View the latest published version of the current playbook.

  • More: Includes other operations, such as Save as JSON, Import JSON, Save as Image, Undo, and Delete.

2-Flow nodes

These are fundamental components required for every flow, independent of external systems. Each flow must have one start node and can have multiple end nodes. For more information, see System components.

3-Component actions and playbooks

  • Components

    • Basic components: Includes general IT components for actions like writing to a database, writing data to SLS, or running a script with Python 3.0.

      Note

      Python 3.0 code runs in a built-in Python 3.9 container environment that belongs to your Alibaba Cloud account. The container has 0.25 vCPU and 256 MB of memory. The maximum script execution time is 600 seconds.

    • Security components: Components that directly handle security threats. Examples include using Server Guard to terminate a process or using Cloud Firewall to block traffic.

    • Cloud product components: Components that call Alibaba Cloud product OpenAPI operations and query threat intelligence. For more information, see Cloud product components (OpenAPI) and AliyunThreatIntelligence component.

    • Third-party components: Components that call the OpenAPI operations of non-Alibaba Cloud products, such as the Web Application Firewall (WAF) of other cloud providers. For more information, see Third-party components (OpenAPI).

  • Playbooks

    • Custom Playbook: Includes all custom playbooks created in the current account.

    • Predefined Playbook: Includes all system-provided predefined playbooks.

4-Canvas area

The canvas area is the workspace for building your flow. You can drag components onto the canvas and connect them based on their logical relationships.

  • Double-click the start node (开始节点 icon) on the canvas to configure its basic information, input method, and trigger method.

  • Double-click a component node on the canvas to configure its basic information, execution conditions, and actions.

  • Double-click the end node (结束节点 icon) on the canvas to configure its basic information.

5-Debugging area

Click Debug or the 展开 icon in the lower-right corner to expand the debugging area to test if the playbook runs correctly.

  • Debug parameters: Enter debug parameters and then click Debug.

    Debug parameters must be in standard JSON format. Click Input Parameter Wizard to view parameter examples.

  • Run Logs: After running the playbook, click the Run Logs tab to view execution results and details.

  • Historical Debugging Records: This tab displays historical debugging records.

Configure a custom playbook

Step 1: Enter basic information

  1. Log on to the Security Center console.

  2. In the left-side navigation pane, choose Agentic SOC > Manage > Response Rules. In the upper-left corner of the console, select the region where your assets are located: Chinese Mainland or Outside Chinese Mainland.

  3. On the Custom Playbook tab, click Create Playbook.

  4. In the Create Playbook panel, enter a Playbook Name and Playbook Description, and click OK.

Note

You can also go to the Predefined Playbook tab, find a suitable playbook, and click Copy in the Actions column to copy the predefined playbook as a new custom playbook.

Step 2: Configure the playbook

  1. After you create the playbook, you are automatically taken to its configuration page. You can also go to the custom playbook list and click Edit in the Actions column to go to the configuration page.

  2. Configure playbook input and output parameters

    1. On the Playbook Editing page, click Settings in the upper-right corner. In the configuration panel, click Input & Output Settings.

      Note

      Each flow must have one start node and can have one or more end nodes.

      image

    2. In the Input & Output Settings panel, configure the input and output parameters for the playbook. For more information, see Playbook parameters (input and output parameters).

  3. Orchestrate the response flow

    To orchestrate the flow, drag components to the canvas and connect them. This topic uses the DataFormat component as an example. For information about how to configure the parameters of other components, see Flow component description.

    Important
    • The start node is named 'event'. Therefore, do not name any other component 'event'.

    • You can add and connect multiple components as needed.

    1. Select a component action

      From the Basic components section on the left, select the DataFormat component. Select an action, such as joindata or convertToJSON, and drag the action to the canvas.

    2. Configure component parameters

      To configure the parameters of a component, click the component on the canvas. Alternatively, on the Basic Information configuration page, in the Action Configuration section, click image to go to the parameter configuration page. For more information about parameter configurations, see DataFormat component.

      • You can enter constants, variable parameters, system parameters, and expressions. For more information, see Component parameters and node execution flow.

      • You can also manually configure parameters. In the input box for a node, you can select a parameter from the drop-down list to generate the corresponding syntax. The following figure shows an example.

        image

  4. After you configure the component, click Save in the upper-left menu bar.

    Warning

    If you exit without saving, the flow information that you edited will be lost.

Step 3: Debug the flow

After you build the playbook, debug it to ensure that it runs as expected.

  1. Set a breakpoint (Optional):

    • Description: A breakpoint pauses the execution at a specific component during debugging. This allows you to check intermediate results.

      Important
      • If the flow has multiple branches, the system debugs only the branch where the breakpoint is set.

      • If you set multiple breakpoints on the same branch, only the last breakpoint takes effect.

    • Procedure: Click the image icon on a node to set a breakpoint.

      image

  2. Start debugging

    1. Click the image Debug icon in the upper-left corner. In the Debug Parameters panel, click Debug.

      Note

      The debug parameters vary based on the types of input parameters that you configure for the playbook.

    2. Load sample parameters:

      1. Click Example.

      2. On the View Sample Input page, click Load Sample.

    3. Modify parameters: Modify the parameters as needed, and then click OK.

      Note

      For easier editing, the system provides an intuitive Visual Mode.

  3. View the debug result

    Click the image icon on a node or click Run Logs in the debugging area to view the execution details of the node, including its input, output, and status. The following table describes some of the output parameters.

    Parameter

    Description

    datalist

    A preview of the result data.

    Important

    A maximum of three entries are displayed for preview. To view all data, go to the Complete Output Result tab.

    total_data_successful

    The number of data items that are successfully processed.

    total_data

    The total number of data items that are processed.

    total_exe_successful

    The number of times that the current action is successfully run.

    total_exe

    The total number of times that the current action is run.

    total_data_with_dup

    The number of unique data items that are successfully processed.

    image

Step 4: Save and publish

After the playbook passes debugging, click Publish in the upper-left menu bar to publish the playbook.

Use a playbook

Only published playbooks can be used for automatic response rules and security event handling.

Important

After a playbook is triggered, you can view the generated response policy and task in the Response Center, or view the execution records on the playbook details page.

  • Bind to an automatic response rule: This automates responses to specific alerts. For more information, see automatic response rules.

  • Manually run during event handling: For complex security events that require manual analysis, you can manually trigger a playbook in the event handling center to aid in response operations. For more information, see the Run Playbook section in Evaluate and handle Agentic SOC security events.

  • Run directly: On the Response Rules page, go to the Predefined Playbook or Custom Playbook tab, find the target playbook, and click Run in the Actions column to run the playbook once.

Other operations

Playbook rollback

To restore a published playbook to a previous version, you can roll it back. Follow these steps:

  1. On the Custom Playbook tab, find the playbook that you want to roll back. In the Actions column, click Details. On the Basic Information tab, view the playbook's version history in the Publish History section.

  2. (Optional) Test the version: Select the version to which you want to roll back, and then click View in the Actions column to open the playbook tab. In the Input Parameters (Run) area, test the selected version.

  3. Select the version to which you want to roll back, and then click Roll Back to Edit or Roll Back and Publish in the Actions column.

    • Roll Back and Publish: Replaces the current draft in the editor with the selected version and publishes it.

    • Roll Back to Edit: Replaces the current draft in the editor with the selected version.

Warning

Rolling back to a published version might overwrite your saved draft. Before you roll back, carefully review the flow differences between the versions.

Playbook import

Note

Only JSON files can be imported.

  1. From the flow editor menu bar, click More and then select Import JSON.

  2. Upload the JSON file and click OK.

image

Playbook execution records

In the playbook list, click a playbook's ID or Details in the Actions column to open its details page. The basic execution records are available on the Historical Execution Records tab.

Note

When you use a playbook to handle an event or a security alert, the system automatically generates a corresponding playbook execution record.

Renaming a playbook

In the playbook list, click a playbook's ID or Details in the Actions column to open its details page. On the Basic Information tab, click Edit next to the playbook name.

Note
  • You cannot rename a predefined playbook.

  • Playbook names must be unique.

Playbook error codes

Error codes fall into two categories: playbook orchestration errors and component execution errors.

Playbook orchestration errors

Error message

Description

Resolution

The filter condition for node [%s] is invalid. It must include data from the datalist of node [%s].

The filter condition for the filter node is invalid. It must reference data from the node being filtered.

Configure the filter condition to include data variables from the node you are filtering.

Start node has no downstream configuration.

No downstream node is defined for the start node.

Define a downstream node for the start node.

The node [nodeName] has no downstream nodes.

No downstream node is defined for a regular node.

Define a downstream node for the regular node.

The resource in node [node] does not exist.

A resource instance is configured, but it does not exist.

Select an existing resource instance.

The resource in node [node] is required but not configured.

No resource instance is configured.

Select and configure a resource instance.

Multiple nodes have the same name [nodeName].

Duplicate node names exist.

Find the duplicate node names and rename them to make each name unique.

The path [path] defined in node [node1] is invalid because the child flow supports only the ${<subTask>.curLoop} and ${<subTask>.curIndex} formats.

In a child flow, a variable is referenced in an incorrect format. Only the ${<subTask>.curLoop} and ${<subTask>.curIndex} formats are supported.

Check the variable definitions for parameters in the child flow and correct any invalid definitions.

The path [node2.path] defined in node [node1] is invalid because node [node2] does not exist.

A parameter variable references a node that does not exist.

The referenced node does not exist or was deleted. Reconfigure the variable or add the missing node.

The path [node2.path] defined in node [node1] is invalid because node [node2] is not an upstream node of the current node.

A parameter variable references a node that is not an upstream node of the current node.

Reference variables only from upstream nodes.

Component execution errors

Error code (errCode)

Error message (errMsg)

Troubleshooting

sophon.Internal.Error

An internal system error occurred.

Check the parameters or resource configuration. For details, view the error message or contact technical support.

component.Internal.ParamError

A parameter of the component is invalid.

Verify that the parameters for the component are configured correctly.

component.Abnormal.InvokeError

Component execution failed.

An internal component error occurred. View the error message for details or contact technical support.

filter.Abnormal.Fail

The data does not meet the filter condition.

Verify that the filter condition is configured correctly.

securityGroup.Internal.HostIsOutside

Hosts outside the cloud cannot use security groups to block IP addresses.

Verify that the target host is not a host outside the cloud.

securityGroup.Internal.NumberExceedLimit

The number of security groups or security group rules exceeds the limit.

Check if the number of associated security groups or the number of rules per security group exceeds the limit.

sts_openapi.Internal.ParamError

ParamError: The parameters of your request are invalid.

Verify that the component's input parameters are correct.

sts_openapi.Internal.WafRuleError

VerifyRuleCountExceed: The number of rules exceeds the limit.

Reduce the number of WAF custom rules.

sts_openapi.Internal.DefenseTemplateNotExist

Defense.Control.DefenseTemplateNotExist: The WAF template does not exist.

Verify that the WAF template has not been deleted.

sts_openapi.Internal.DefenseTemplateBindUnbindResourceInvalid

Defense.Control.DefenseTemplateBindUnbindResourceInvalid: The resource to be bound to the template is unavailable.

Verify that the resource is available.

sts_openapi.Internal.DefenseResourceRelationExist

Defense.Control.DefenseResourceRelationExist: The resource to be bound to the template is already bound to another template.

Verify that the resource is not already bound to another template.

sts_openapi.Info.DefenseSceneNotSupported

Defense.Control.DefenseSceneNotSupported: This protection scenario is not supported.

Upgrade your WAF instance to a version that supports this protection scenario.

sts_openapi.Internal.ErrorAddressGroupExist

ErrorAddressGroupExist: The address group already exists.

Use a unique name for the Cloud Firewall address group.

sts_openapi.Internal.PermissionError

NoPermission: The caller does not have permission.

Obtain the required permissions to modify the resource.

sts_openapi.Internal.CFWRuleError

The number of ACLs or expanded ACLs exceeds the limit.

Reduce the number of Cloud Firewall rules.

sts_openapi.Internal.InvalidSecurityGroupId

InvalidSecurityGroupId.NotFound: The specified SecurityGroupId does not exist.

Verify that the specified security group exists.

sts_openapi.Internal.ErrorParametersGroupAddress

ErrorParametersGroupAddress: The IP address in the address group is invalid.

Verify that the IP addresses in the address group are valid.

sts_openapi.Internal.notBuyUser

not buy user: You have not purchased this product.

Purchase a Cloud Firewall subscription.

sts_openapi.Internal.Throttling

The error message contains the "throttling" or "Throttling" keyword.

Reduce the API call frequency to avoid throttling.

python.Info.aegis2

The process does not exist.

Verify that the specified process exists.

python.Internal.aegis3

The process PID and path do not match.

Ensure the process PID and its path are correct.

python.Internal.aegis4

Process permission denied.

Ensure you have the necessary permissions to manage the process.

python.Info.aegis5

The file does not exist.

Verify that the specified file exists.

python.Internal.aegis6

The file MD5 hash values do not match.

Verify that the provided MD5 hash matches the file's actual MD5 hash.

python.Internal.aegis7

File permission denied.

Ensure you have the required permissions to handle the file.

python.Internal.aegis8

The target file exists and its MD5 hash does not match.

The target file exists and its MD5 hash does not match.

python.Internal.aegis9

The backup file does not exist.

The backup file for the target file is missing.

python.Internal.aegis10

No quarantine record was found.

Verify that a quarantine record exists for the specified file.

python.Internal.aegis11

You cannot terminate or quarantine the AliYunDun process.

This is a protected system process and cannot be terminated or quarantined.

python.Internal.aegis91

The host information does not exist.

The host information does not exist.

python.External.Fail

A Python script error occurred.

Check the error message for details about the script error, or contact technical support.

python.External.Data

Invalid input format for the Python component.

Correct the input format of the Python component. For details, view the error message or contact technical support.