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.

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 Script Details window, enter a name and description for the script.

3. From the Severity drop-down list, select the severity and then click Next.

The severity level defines the criticality of the script. Select a value from 1 to 5.

Create New Script

In the Add Script window, do the following:

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

b. Select the Type and Category from the respective drop-down lists.

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

The threshold for both Windows assets and Linux assets is 3600 seconds. The default value is 300 seconds.

d. In the Select Script box, click Browse to navigate to the script that you want to upload. Alternatively, type the script in the Script text box.

When you upload a script, the script content is displayed in read-only format in the Script text box.

e. Click Next.

Add Script

The script size limit for any asset on both Windows and Linux platforms is 500 KB.

Note: If you are using a signed script, always use the browse mechanism to select it. This ensures that the signed script remains intact and can be executed on assets if the execution policy is set to AllSigned.

4. In the Review & Confirm page, review the information and then click Confirm & Save to create the script. The newly created script will be listed in the Script tab.

Review & Confirm

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.

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.

Related Topics

Testing Scripts

Reviewing and Approving Scripts

Executing Scripts

Exporting and Importing Scripts