Creating Scripts

You can create a custom script and select the assets that you want to include in your scope. You can execute the custom script on assets across any of the Qualys apps that you have subscribed to.

You can also import a script. For information on importing scripts, refer to Exporting and Importing Scripts.

According to the CAR Data Retention policy, a script is automatically deprecated if it is not modified or executed for 6 months. Additionally, a deprecated script is automatically deleted after 7 days as a part of a scheduled job.

To create a script:

1. Navigate to the Scripts > Scripts sub-tab and then click Create > New Script from the drop-down menu.

Create New Script

2. In the Basic Information page, enter a name and description for the script.

4. In the Script Details page, do the following:

a. Select the Platform (Unix, Windows Linux, or Mac) and then select the type and the appropriate category for the script from the provided drop-down menus.

b. Select the Scripting Language, Category from the respective drop-down lists.

c. Specify the threshold value in seconds, minutes or hours. The threshold value lets you specify how long a script must be in execution.

The threshold value for all Windows assets, Linux assets and Unix assets is 3600 seconds. The default value is 300 seconds.

d. In the Scripts section, select one of the following options:

- Manually Enter a Script

- Upload a Script

- Import from GitHub

5. Click Next.

6. You are navigated to the Review and Confirm page. Click Review and Confirm.

Next steps:

1. Test the script on assets. This is an optional step.

For more information, refer to Testing Scripts.

2. Execute the script. A job is created when you execute a script. Once the job is complete, you can click on Job Details to view the script output on each asset.

For more information, refer to Executing Scripts.

Note: Previously, Scripts used to have Assets and tags that are no longer visible on Script Details. 

Modify the Approved Script Content

The manager role can edit the content of the approved script. 

To modify the Approved script navigate to Scripts,
1. Select Quick Actions of the approved script.

2. Click Edit.

3. Click Next from the Basic Information page.
4. The Script Details page is displayed. To modify the script content start typing in the new content field.

5. Edit the script and provide the reason for the modification.

6. Click Next.

7. Review and Confirm page is displayed. Click Update to update the script modification.

Related Topics

Testing Scripts

Reviewing and Approving Scripts

Executing Scripts

Exporting and Importing Scripts

Creating Custom QIDs Using Scripts