Creating Scripts

You can create a custom script and select the assets you want to include in your scope. You can execute the custom script on assets across any Qualys apps 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 part of a scheduled job.

Create a Script

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

  1. Navigate to the Scripts tab > Scripts  > Create > New Script.

    Create New Script

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

  3. In the Script Details page, enter the following details:
    1. 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.
    2. Select the Scripting Language and category from the respective drop-down lists.
    3. 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, Linux, and Unix assets is 3600 seconds, while the default value is 300 seconds.

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

      Manually Enter a Script

      Upload a Script

      Import from GitHub

      You have the option to create a new parameterized script using any of these three options.

      When you input the script in Script field and if script values are written in the format <#value#>, it becomes a parameterized script. In this case, you need to enter the values of the script parameters using the edit icon. Unless you enter the parameters, you can not proceed with the next step.

       

      Once you update the parameters, click Update.

  4. Click Next.
  5. Review and Confirm the information.
  6. Click Confirm & Save to create the script.

Next Step

For more information, refer to Executing Scripts.

  1. Test the script on assets. his 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.

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.

    The Script Details page is displayed.

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