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 Importing Scripts.

Create a Script

To create a script, follow these steps:

  1. Navigate to the Scripts > 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, complete the following fields:
    Field Description
    Platform Select a platform from the list:
    • Unix
    • Windows
    • Linux
    • Mac
    Type of Script Select a script type from the list:
    • Custom Script
    • Custom QID

    Select Custom Script from the options listed. If you want to create a custom QID script, refer to Creating Custom QID Scripts.

    Scripting Language Select a required Scripting Language from the list. The Scripting Language options change as per the selected platform.

    If you have selected the Windows platform, the following languages are displayed:

    • PowerShell-Command
    • PowerShell-Script
    • Python
    • VBScript

    If you have selected the Linus, Unix, or Mac platform, the following languages are displayed:

    • Lua
    • Perl
    • Python
    • Shell
    Category Select a category for the script from the list.
    Timeout limit Specify the Timeout limit in seconds, minutes, or hours. The Timeout limit lets you specify how long a script must be in execution.

    The Timeout limit field only accepts whole numbers (integers).

    Severity Select a severity value from the list ranging from 1 to 5, with 5 being the most severe and 1 the least severe.
  4. In the Scripts section, select one of the following options to provide the script:

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

  5. Click Next to view the Review and Confirm page.
  6. Review the script and click Confirm & Save to create the script.

After creating a script, you can test and execute the script. For more information, refer to Testing Scripts and Executing Scripts.

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

Modify the Approved Script Content

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

To modify the approved script, follow these steps:

  1. Navigate to the Scripts tab.
  2. To edit a script, select an approved script and click Edit on the Quick Actions menu.

  3. In the Basic Information page, click Next.

    The Script Details page is displayed.

  4. Modify the editable content as required.

  5. Provide the Reason for Edit.
  6. Click Next to view the Review and Confirm page.
  7. Review the script and click Update to save the changes to the script.

Related Topics

Testing Scripts

Reviewing and Approving Scripts

Executing Scripts

Exporting and Importing Scripts

Creating Custom QIDs Using Scripts

Creating Parameterized Script