Using Playbook Remediation

CAUTION: Running any of the playbooks will modify and in some cases, delete resources from your Cloud Account. If you are unsure about running any of the playbooks, consult your operations team before remediation.

How to Use Playbook Remediation

2020-11-05_8-45-22

1. Navigate to the check you want to remediate (you can do this from the Dashboard, Rules View, Resources View, and Compliance View). This should open up Check Details.

2. Click on the Remediation tab. Rules with Playbook Remediation available have the lightning bolt icon next to it.

3. Once you’re in the Remediation section, click on Playbook Code.

4. Click Download and save the file somewhere easily accessible.

5. 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>

6. Open a command line shell and make sure it’s running in the same folder as the playbook code you just downloaded.

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

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


2020-11-05_8-49-29

The playbook will then tell you every step if it was able to succeed with a remediation step, or an error that tells you what’s wrong.