Help Center/ Host Security Service/ User Guide/ Server Protection/ Virus Scan/ Managing Custom Antivirus Policies
Updated on 2025-09-08 GMT+08:00

Managing Custom Antivirus Policies

Scenarios

A custom antivirus policy is generated for each custom antivirus task that starts periodically or at a specified time point. You can modify or delete such policies as needed.

The policy of a task scheduled to be executed at a specified time point will expire after execution, and will be marked with an expiration tag. You can change the startup time of the policy and enable it again.

Editing a Custom Scan Policy

  1. Log in to the HSS console.
  2. Click in the upper left corner and select a region or project.
  3. Choose Server Protection > Virus Scan.
  4. Choose Custom scan policies to view existing user-defined antivirus policies.
  5. In the Operation column of a policy, click Edit. Modify the policy on the edit page. For more information, see Table 1.

    Table 1 Custom antivirus policy parameters

    Parameter

    Description

    Example Value

    Task Name

    HSS automatically generates a task name based on the task creation time (accurate to seconds). You can modify it as needed.

    Custom Scan-20250425180036

    Startup Type

    Scan task execution type.

    • Scan Now: Start a scan immediately.
    • Scan Later: Start a scan at the specified time.
    • Periodic Start: Start a scan periodically based on your settings.

    Scan Later

    Start

    If Startup Type is set to Scan Later, configure this parameter to set the start time of the scan. You can set the start time to a time within one month.

    2025/04/25 18:10

    Schedule

    If Startup Type is set to Periodic Start, configure this parameter to set the scan period.

    -

    File Type

    Type of the file to be scanned. Currently, the following types of files can be scanned:

    • Executable: executable files and dynamic link libraries (DLLs), such as .exe, .dll, and .so files
    • Compressed: installation packages or other compressed packages, such as .zip, .rar, and .tar files
    • Script: script files, such as .bat, .py, and .ps1 files
    • Document: document files, such as .txt, .doc, and .pdf files
    • Image: image files, such as .bmp, .jpg, and .gif files
    • Audio & Video: audiovisual files, such as .mp3, .mp4, and .flv files

    Select All

    (Optional) Directory Settings

    Directory where virus-infected files need to be scanned. If this parameter is not set, full scan is performed by default. Full scan does not cover network directories.

    WARNING:

    The reasons for not scanning network directories are as follows:

    • Inefficient scan

      A network directory usually contains a large number of files and may reach hundreds of terabytes, severely slowing down a scan.

    • Network bandwidth consumption

      Accessing a network directory consumes network bandwidth. A large-scale scan may fully occupy the network bandwidth and affect your workloads. For example, the access speed may slow down and the network latency may increase.

    -

    (Optional) Exclude Specified Directories

    Directories that do not require virus scan.

    -

    Select Server

    Select the servers to be scanned.

    You can select and scan servers that meet all the following conditions:

    • Have online agent (Windows agent 4.0.20 or later, or Linux agent 3.2.9 or later) For details about how to install the agent, see Installing the Agent on Servers.
    • The AV detection policy is enabled. For details about how to enable it, see Configuring Policies.
    • The task start conditions required by the corresponding policy are met:
      • Policy whose Startup Type is Scan Now: The server is not being scanned.
      • Policy whose Startup Type is Scan Later: No other custom scan policies using the same startup time as the current policy are bound to the server.
      • Policy whose Startup Type is Periodic Start: No other custom policies whose Startup Type is Periodic Start are bound to the server.

    -

    Handling Policy

    Action to be taken on the detected virus-infected files.
    • Automatic Handling: HSS automatically isolates the detected malicious files. The suspicious files that are not confirmed as viruses are labeled as suspicious and need to be manually checked and handled.
      CAUTION:

      In rare cases, files may be incorrectly isolated. In this case, you can restore the isolated files on the Isolated Files page. For details, see Restoring Isolated Files.

    • Manual Handling: Alarms are generated only for detected infected files. You need to manually confirm the files before handling them.

    Automatic Handling

  6. Click OK.

Deleting a Custom Scan Policy

  1. Log in to the HSS console.
  2. Click in the upper left corner and select a region or project.
  3. Choose Server Protection > Virus Scan.
  4. Choose Custom scan policies to view existing user-defined antivirus policies.
  5. Click Delete in the Operation column of a policy.

    To delete policies in batches, you can also select multiple policies and click Delete in the upper left corner of the list.

  6. Click OK.