Skip to content

Scanner Execution and Scheduling#

This page explains how to run a scan manually, change the run time, stop and resume scheduled runs, and check the logs on the scanner server (the server on which the scanner is installed).

This page covers the process in which the scanner installed on the scanner server collects configuration information and uploads it to FutureVuls.

There are three processes with similar names. Only running the scanner, which this page describes, can reflect changes to the server's configuration (such as added or updated packages) in FutureVuls.

Process Execution location Scanner on the server Content reflected in FutureVuls
Running the scanner (this page) The scanner server (scheduled run or manual run) Starts Changes to the server's configuration, and the results of matching against the latest vulnerability information
"Manual Scan" in the UI The FutureVuls UI Does not start The results of matching the already uploaded configuration information against the latest vulnerability information
Periodic Automatic Scans FutureVuls runs it automatically once a day Does not start The results of matching the already uploaded configuration information against the latest vulnerability information

For details on the differences, see "How Scanning Works > When Scans Run".

The scanner starts automatically once a day according to the schedule definition registered during installation.

Scanner Schedule definition Scan script
Linux scanner cron (/etc/cron.d/vuls-saas-scan) /opt/vuls-saas/vuls-saas.sh
Windows scanner vuls-saas-scan task in Task Scheduler C:\Program Files\vuls-saas\vuls-saas.bat
Trivy scanner (standard version) cron (/etc/cron.d/vuls-trivy-saas-scan) /opt/vuls-trivy-saas/vuls-trivy-saas.sh

The lightweight version of the Trivy scanner has no scheduled runs. To update its configuration information, see "Container Image Scan (Trivy)" and "Dependency Library Scan".

Running the Scanner Manually#

Use these methods to run a scan without waiting for the scheduled run, for example right after installing the scanner or right after changing the server's configuration.

For Amazon EC2 instances registered with Local Scan, if you configure the AWS integration, you can start the scanner from the FutureVuls UI without logging in to the server. For the conditions and how to configure it, see "Scanning with SSM".

When scanning the same server repeatedly

If another scan result is uploaded while a scan result from the same server (same UUID) is being processed, the later scan result is normally reprocessed after the first processing finishes, but depending on the timing, it may not be imported. When you scan the same server repeatedly, run the next scan after the previous scan result has been imported.

Linux#

Run the scan script /opt/vuls-saas/vuls-saas.sh with the privileges of the vuls-saas user.

To run it as the vuls-saas user with sudo, run the following command.

sudo -H -u vuls-saas /opt/vuls-saas/vuls-saas.sh >/dev/null 2>&1

This command does not display any output on the screen. Check whether the run succeeded in the logs described in "Checking Scan Results and Logs".

To switch from the root user to the vuls-saas user and run it, run the following commands in order.

su - vuls-saas
/opt/vuls-saas/vuls-saas.sh

Windows#

Run the scanner using one of the following methods.

  • Run from Task Scheduler: Open Task Scheduler, right-click the vuls-saas-scan task at the top level ("Task Scheduler Library"), and select "Run".

    The menu for right-clicking the vuls-saas-scan task in Task Scheduler and running it

  • Run from Command Prompt: Start Command Prompt with administrator privileges and run the following command.
    "C:\Program Files\vuls-saas\vuls-saas.bat"
    

Trivy (Standard Version)#

Run the following command as the root user or the vuls-trivy-saas user.

/opt/vuls-trivy-saas/vuls-trivy-saas.sh &> /opt/vuls-trivy-saas/vuls-trivy.log

Checking and Changing the Run Time#

At installation, the scheduled run time is set to about 5 minutes after the time of installation. After that, a scan runs at that time every day. You can change it to any time you like.

Linux#

The execution schedule is defined in /etc/cron.d/vuls-saas-scan. Change the time using cron format.

root@scan01:~# cat /etc/cron.d/vuls-saas-scan
5 0 * * * vuls-saas /opt/vuls-saas/vuls-saas.sh >/dev/null 2>&1
root@scan01:~#

Windows#

Change the run time of the vuls-saas-scan task in Task Scheduler.

Trivy (Standard Version)#

The execution schedule is defined in /etc/cron.d/vuls-trivy-saas-scan. Change the time using cron format.

$ cat /etc/cron.d/vuls-trivy-saas-scan
59 06 * * * vuls-trivy-saas /opt/vuls-trivy-saas/vuls-trivy-saas.sh &> /opt/vuls-trivy-saas/vuls-trivy.log

Stopping and Resuming Scheduled Runs#

This section explains how to temporarily stop the scanner's scheduled runs and how to resume them. In this context, stopping means preventing the next and subsequent scheduled runs. If you no longer use the scanner, see "Uninstalling the Scanner".

While scheduled runs are stopped, changes to the server's configuration are not reflected in FutureVuls unless you run the scanner manually.

Scanner Stop Resume
Linux scanner Add a # to the beginning of the definition in /etc/cron.d/vuls-saas-scan Remove the leading #
Windows scanner Set the vuls-saas-scan task in Task Scheduler to "Disabled" Set the vuls-saas-scan task to "Enabled"
Trivy scanner (standard version) Add a # to the beginning of the definition in /etc/cron.d/vuls-trivy-saas-scan Remove the leading #

Linux#

An example of a stopped definition is as follows.

#15 16 * * * vuls-saas /opt/vuls-saas/vuls-saas.sh >/dev/null 2>&1

Windows#

task_scheduler

Stop: Right-click the vuls-saas-scan task and select "Disable".

task_scheduler

If the task status shows "Disabled", scheduled runs are stopped.

task_scheduler

Resume: Right-click the stopped vuls-saas-scan task and select "Enable".

task_scheduler

If the task status shows "Ready", the scanner will start at the trigger time.

task_scheduler

Trivy (Standard Version)#

An example of a stopped definition is as follows.

#59 06 * * * vuls-trivy-saas /opt/vuls-trivy-saas/vuls-trivy-saas.sh &> /opt/vuls-trivy-saas/vuls-trivy.log

Checking Scan Results and Logs#

After a scan finishes, the results appear in the FutureVuls UI once FutureVuls finishes processing them. You can check whether the scanner is running every day in the "Last Configuration Sync" column of the list on the Server / Product tab (you can display this column from "Columns" above the list).

If the results do not appear after a few minutes, or if the scan fails, check the logs on the server. If uploads fail in an environment that goes through a proxy server, also check "Proxy Settings".

Linux#

Path File Description
/opt/vuls-saas/ vuls-saas.log Progress of the run (the start and end of the scanner binary update, the scan, and the upload). If the scan fails, the line Failed to complete vuls scan. is output. Even in that case, the line Complete vuls scan. is output after it, so check whether the scan succeeded or failed by whether a Failed line exists and in scan.log. If the upload succeeds, the line Complete vuls upload. is output; if it fails, the line Failed to complete vuls upload. is output
/opt/vuls-saas/ scan.log Latest scan status. Records whether the scan succeeded or failed, and any errors.
/opt/vuls-saas/ report.log Latest file upload status. Records errors such as failures to upload to FutureVuls. If the upload fails, the proxy settings may be the cause.
/opt/vuls-saas/results/ /.json
ex. 2024-11-19T17-37-32+0900/UserAAA.json
List of packages detected by the scanner. This file is automatically deleted when the upload process to FutureVuls runs.

Windows#

Path File Description
C:\Program Files\vuls-saas vuls-saas.log Summary of scan.log and report.log. Records whether the scan and the upload succeeded or failed.
C:\Program Files\vuls-saas scan.log Latest scan status
C:\Program Files\vuls-saas report.log Latest file upload status
C:\Program Files\vuls-saas\results\ /.json
ex. 2024-11-19T17-37-32+0900/UserAAA.json
List of packages detected by the scanner. This file is automatically deleted when the upload process to FutureVuls runs.

If an error occurs, see the "Windows Scanner FAQ".

Trivy (Standard Version)#

The progress and the success or failure of processing are recorded in /opt/vuls-trivy-saas/vuls-trivy-saas.log. The output of the commands executed in scheduled runs is recorded in /opt/vuls-trivy-saas/vuls-trivy.log. Check both files. If the scan results do not appear, see "Trivy scan results do not appear in FutureVuls".

Troubleshooting#

Check the common causes and fixes on the following pages.