Migrate from scanner ignore files

Move the suppressions from a hand-written ignore file, such as .trivyignore, into your Vulnlog file, and generate the suppression file from Vulnlog from then on. Your scanner suppresses the same findings as before.

Vulnlog doesn’t import scanner output, so you add the entries yourself, with vulnlog modify add or in the YAML. You only need entries for the findings you’ve analysed or want to suppress. The scanner keeps reporting findings without an entry, as before.

Before you start

  • A Vulnlog file with your releases. To create one, see Create a Vulnlog file.

  • The ignore file of your scanner.

In this guide, Acme Shop has a .trivyignore with one line, and acme-shop.vl.yaml doesn’t have an entry for Spring4Shell yet:

CVE-2022-22965

Move the suppressions

  1. List the IDs in the ignore file, and find out for each one why it’s suppressed. Ask the person who added it, or look at the commit that added it.

  2. Add an entry for each ID with what you know, using the scanner as reporter:

    $ vulnlog modify add acme-shop.vl.yaml --vuln-id CVE-2022-22965 --name Spring4Shell \
        --description "Remote code execution through data binding in Spring Framework" \
        --release 4.2.0 --release 4.3.0 \
        --package "pkg:maven/org.springframework/spring-beans@5.3.15" \
        --reporter trivy --tag backend --tag container \
        --analysis "Acme Shop runs as a Spring Boot executable JAR on JDK 17. The published exploit needs a WAR deployment on Apache Tomcat, but Spring advises all users to upgrade." \
        --analyzed-at 2026-11-07 --verdict affected --severity medium --disposition "will fix"
    Added: CVE-2022-22965 to acme-shop.vl.yaml

    modify add dates the report today, and vulnlog validate warns if --analyzed-at is earlier. Pass today’s date, or set the report’s at in the YAML to the day the scanner first reported the finding. For the verdict values, see Verdicts and justifications.

  3. Add a suppress block to the report of each affected entry and each entry without a verdict. Entries with the verdict not affected don’t need one, because Vulnlog suppresses them anyway. For the rules, see Suppression rules. Give the block an end date if the suppression is temporary:

        reports:
          - reporter: trivy
            at: 2026-11-07
            suppress:
              expires_at: 2027-03-31
  4. Generate the suppression file and compare its IDs with the old file:

    $ vulnlog suppress acme-shop.vl.yaml --reporter trivy
    Wrote: /home/dev/acme-shop/.trivyignore.yaml
    $ diff <(grep -oE 'CVE-[0-9]+-[0-9]+' .trivyignore | sort) <(grep -oE 'CVE-[0-9]+-[0-9]+' .trivyignore.yaml | sort)

    No output means both files suppress the same IDs. An ID only in .trivyignore has no entry yet, or its entry has no suppress block.

  5. Delete the old file, point Trivy to .trivyignore.yaml, and commit:

    $ git rm .trivyignore
    $ git add acme-shop.vl.yaml .trivyignore.yaml
    $ git commit -m "Move Trivy suppressions to Vulnlog"

From now on, change acme-shop.vl.yaml and generate the file again. For how to use the file with each scanner, see Generate suppression files.

Variants

If nobody knows why an ID is suppressed

Add the entry without a verdict, and give the report a suppress block with an end date. The scanner stays quiet until that date, and the entry has the state under investigation until you triage it:

  - id: CVE-2023-32681
    description: Proxy-Authorization header leak in requests
    releases: [4.3.0]
    packages: ["pkg:pypi/requests@2.28.2"]
    reports:
      - reporter: github-dependabot
        at: 2026-07-14
        suppress:
          expires_at: 2026-12-31

If the ignore file is for another scanner

Use that scanner as reporter and compare with its generated file. Snyk needs Snyk IDs in its file, so add them to the report with vuln_ids. For the file name of each scanner, see Supported scanners.

Check the result

  1. Validate the file with vulnlog validate --strict acme-shop.vl.yaml.

  2. Run the scanner with the generated file. It reports the same findings as with the old file.