Skip to content

Container Image Scan (Trivy)#

This method scans container images with the open-source scan tool "Trivy" and imports the results into FutureVuls so that you can manage container image vulnerabilities. In the FutureVuls UI, Container Image Scan, which is displayed under Add Server on the Server / Product tab, corresponds to this scan method.

Item Description
Target OS packages and dependency libraries contained in container images (Docker images)
Prerequisites An environment in which to install the Trivy scanner (see "Supported Environments"). The environment must be able to obtain the container image to be scanned. For the installation procedure, see "Scanning by Installing Trivy in a Local Environment"
Registration destination When you upload the scan results, the container image is registered as a server in FutureVuls
Update timing With the standard version, the scanner automatically scans and updates on a schedule. With the lightweight version, you run a command to update. For the scan interval and a comparison of the two versions, see Installing the Trivy Scanner

The Trivy scanner scans the container image and uploads the results to FutureVuls, and the container image is registered as a server

Alternatively, you can integrate with Amazon ECR or Google Artifact Registry to scan for vulnerabilities in Docker images stored on a container registry.

For container image scanning with Trivy, the following two patterns are available:

About the Scan Target#

For scan targets, please refer to Supported Environments. For details on the OSes that Trivy supports, please refer to "Trivy Supported OS."

Scanning by Installing Trivy in a Local Environment#

Run Trivy locally to scan container images and upload the results to FutureVuls. For the differences between the standard and lightweight versions and how to select one, see Installing the Trivy Scanner.

Item Description Standard Version Lightweight Version
Supported Environments Supported local environments Supported environments for Container Image Scans (Trivy) Linux on the x86_64 or aarch64 CPU architecture (see "Installing the Trivy Scanner")

Scanning a New Container Image#

Server Name Specification Change (Effective July 14, 2025)

The specification for server names registered during a Trivy Scan has been changed.

  • Before: Image Name:Tag (e.g., myapp:v1.0.0)
  • After: Image Name only (e.g., myapp)

On the server list screen, the actual scanned image name and tag are now displayed separately. The server name is a name for display. Whether an upload updates the configuration information of the same server is determined not by the server name but by the server UUID specified when the scan results are uploaded.

To scan a new container image and register it in FutureVuls, follow these steps.

  1. Click the Add Server button on the Server / Product tab to open the dialog, then select Container Image Scan.

    Navigating to the add container image scan dialog

  2. Select a scanner token and enter the name of the container image to be scanned.

    • A scanner token is a token that the scanner uses to upload scan results to FutureVuls. If there are no options to select, add one by referring to "Managing Scanner Tokens".
    • Specify the image name in the <image_name>:<tag> format (example: myapp:v1.0.0).
    • The installer of the standard version records the part before the first : of the entered value as the image name (imageName) and the part after the last : as the tag (tag) in /opt/vuls-trivy-saas/config.toml. If you specify an image name that includes a registry port number, such as registry.example.com:5000/team/api:v1, change imageName in config.toml to registry.example.com:5000/team/api after installation, and then run the scan.
    • If you specify latest as the tag (example: myapp:latest), the image that has the latest tag at that time is scanned on each scan. However, the scanner does not re-obtain the image before a scan. If an image with the same name and tag exists in the scanner's environment, that image is scanned, so update the image before the scan as needed.
  3. If you use a proxy, enter the proxy server to use.
  4. If using the lightweight version, turn on the Use light version switch. The lightweight version uses vuls-trivy-scan directly under the directory in which you run the command as its working directory, and deletes it, including the files in it, when it exits normally. Run the command in a directory that does not contain vuls-trivy-scan (see "Installing the Trivy Scanner").
  5. Copy the command displayed at the bottom of the screen, paste it into the environment where you install the Trivy scanner, and execute it.
    • For the standard version, please execute with root privileges.
    • The scanner runs trivy image <image_name>:<tag> in this environment. Where the image is obtained from (such as the local container runtime or a container registry) and how authentication to a private registry works follow the Trivy specifications. For details, see "Trivy: Container Image".
  6. In FutureVuls, verify that the scanned image has been added to the Server / Product tab of the target group.
    • When you install the standard version for the first time, it may take 5-10 minutes for the results to appear in FutureVuls.
      • To run a scan immediately after installation, execute the following command:
        • /opt/vuls-trivy-saas/vuls-trivy-saas.sh &> /opt/vuls-trivy-saas/vuls-trivy.log

Registration is now complete.

To add container images to be scanned, perform the same procedure for each image. With the standard version, the second and subsequent runs append the scan target to the existing /opt/vuls-trivy-saas/config.toml.

Updating Information for a Registered Container Image#

There are the following two types of updates. "Configuration information" is the list of OS packages and dependency libraries contained in a container image.

Purpose Standard Version Lightweight Version Work location
Re-match the registered configuration information against the latest vulnerability information (the contents of the image have not changed) Run a manual scan in the FutureVuls UI. A periodic automatic scan also re-matches it, but the targets differ by plan (see "Periodic Scans, Manual Scans, and Automatic Re-matching > Target Servers") Same as the standard version The FutureVuls UI
Reflect changes in the contents of the container image in FutureVuls The scanner automatically scans and reflects them on a schedule. To reflect them immediately, run the scanner manually You run the command displayed on the screen The environment where the Trivy scanner is installed (for the lightweight version, the environment where you run the command)

Reflecting Changes in Container Image Configuration in FutureVuls#

  • For the standard version:
    • The scanner automatically runs on a schedule to scan the image, so you do not need to start the scanner manually.
    • If you update the contents of the image without changing its tag (such as latest), also update the image in the environment where the scanner runs. The scanner does not re-obtain the image before a scan, and scans the image with the same name and tag in that environment.
    • To start the scanner immediately, execute the following command as the root user or vuls-trivy-saas user.
      • /opt/vuls-trivy-saas/vuls-trivy-saas.sh &> /opt/vuls-trivy-saas/vuls-trivy.log
  • For the lightweight version:

    1. In the Server / Product tab, click the target container image to open its details page.
    2. Open the Settings sub-tab on the Description tab, then click the Update Configuration Information button to open the dialog.

      Update container image

    3. Select a scanner token and enter the name of the container image to be scanned.

    4. If you use a proxy, enter the proxy server to use.
    5. Copy the command displayed at the bottom of the screen, paste it into the environment where you run the scan, and execute it. Run it in a directory that does not contain vuls-trivy-scan (see the description in step 4).

Configurable Options for Trivy Scans#

With the standard version of Trivy scan, you can specify scan options using the /opt/vuls-trivy-saas/config.toml file. For details, please see "Scanner Settings > Configuration with Trivy".

If Scanning Fails#

Check the common causes and fixes on the following pages.