Skip to main content

Playbook Code Remediation

With Playbook Code Remediation you can easily address some GravityZone Cloud Security findings by running a code playbook to remediate an issue rather than having to go through a manual process. This helps you cut down the time spent on fixing issues within your cloud environment, leading to an improved security posture as more issues can get addressed.

Prerequisites:

  • NodeJS (LTS version)

For AWS Playbooks:

  • AWS Software Development Kit for JavaScript in Node.js (AWS-SDK).

  • IAM credentials with sufficient permissions to run the playbooks.

  • AWS-CLI environment set up to use the IAM credentials.

Refer to the guidelines below:

  1. In the Remediation section, click on Playbook Code.

  2. Click the Remediate button.

    The remediation will then proceed. This can take a while to finish depending on what rule you are remediating. A message is displayed in the Check Details panel if your remediation was successful or failed. You can also verify these details by clicking the link from the Check Details panel, next to the resource name.

    CSPM_AWS_remediation_bucket_link_cp_459280_en.png

Alternatively, you can use the following steps:

  1. In the Remediation section, click the Playbook Code.

  2. Click Download and save the file in a location easily accessible.

  3. Go back to Playbook Code and click Copy next to the CLI Command.

    This command line string contains all the parameters and commands needed for you to run the playbook. Typical format:

    npm i <required library> && node <playbook filename> -id <resource ID> -region <region> -project_name <project_name>
  4. Open a command line shell and make sure it’s running in the same folder as the playbook code you just downloaded.

  5. Paste the CLI Command you just copied on the command line shell and run it.

    Note

    The CLI command works on Linux, MacOS, and Windows CMD. It does not work in Powershell.

The playbook will then inform you at every step if it was able to succeed with the remediation, or show an error informing you what went wrong.