Generate suppression files
Generate a suppression file for each scanner from your Vulnlog file. Your scanners then skip the findings that don’t affect you or that you chose to suppress, and keep reporting the rest.
Before you start
-
A Vulnlog file with triaged entries. See Triage a new scanner finding. Each entry lists the scanners that reported it under
reports.
Generate the files
-
Run
vulnlog suppresswith your Vulnlog file. It writes one suppression file to the current directory for each scanner the Vulnlog file names:$ vulnlog suppress acme-shop.vl.yaml Wrote: /home/dev/acme-shop/github-dependabot.generic.json Wrote: /home/dev/acme-shop/dependency-check-suppressions.xml Wrote: /home/dev/acme-shop/.trivyignore.yaml Wrote: /home/dev/acme-shop/npm-audit.generic.json Wrote: /home/dev/acme-shop/grype.generic.jsonScanners with a native format get a file in that format. The others get a generic JSON file named
<reporter>.generic.json. For the scanners and file names, see Supported scanners. -
Point each scanner to its file. This is the generated file for Trivy:
# Generated by Vulnlog (https://vulnlog.dev). DO NOT EDIT. --- vulnerabilities: - id: CVE-2022-22965 expired_at: 2027-03-31 statement: >- 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.How you pass the file depends on the scanner:
-
Trivy:
trivy fs --ignorefile .trivyignore.yaml . -
OWASP Dependency-Check:
dependency-check.sh --scan . --suppression dependency-check-suppressions.xml -
Snyk: keep
.snykin the project directory, where the Snyk CLI reads it. -
cargo-audit: create the
.cargodirectory of the project withmkdir -p .cargo, then writeaudit.tomlinto it with--reporter cargo-audit --output-dir .cargo. -
Scanners with a generic JSON file don’t read it. Convert the file, or filter the scanner’s output with it. See Use generic suppression files.
-
-
Commit the generated files, or generate them in your pipeline before the scanner runs. Either way, regenerate them after every change to the Vulnlog file. Don’t edit them by hand. To generate them in CI, see Run in CI pipelines.
Which entries a file contains follows the suppression rules.
See Suppression.
Vulnlog writes a file for every scanner that the Vulnlog file names, even when no entry applies to it, so suppressions that no longer apply drop out.
If you pass --reporter with a scanner that no entry names, Vulnlog writes no file and prints this:
Unchanged: no suppression entries applicable
Variants
If you only need the file of one scanner
Pass --reporter.
Add -o to choose the file name, or -o - to print it:
$ vulnlog suppress acme-shop.vl.yaml --reporter trivy -o -
# Generated by Vulnlog (https://vulnlog.dev). DO NOT EDIT.
---
vulnerabilities:
- id: CVE-2022-22965
expired_at: 2027-03-31
statement: >-
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.
Without --reporter, -o fails if the Vulnlog file names more than one scanner:
error: -o requires a single reporter, found: dependency-check, github-dependabot, grype, npm-audit, trivy hint: use --reporter <name> to pick one, or --output-dir for one file per reporter
If the files belong in another directory
Pass --output-dir.
The directory must exist:
$ mkdir -p build/suppressions
$ vulnlog suppress acme-shop.vl.yaml --output-dir build/suppressions
Wrote: build/suppressions/github-dependabot.generic.json
Wrote: build/suppressions/dependency-check-suppressions.xml
Wrote: build/suppressions/.trivyignore.yaml
Wrote: build/suppressions/npm-audit.generic.json
Wrote: build/suppressions/grype.generic.json
If your tooling reads the generic format
Pass --format generic to get the generic JSON file for every scanner, including those with a native format:
$ vulnlog suppress acme-shop.vl.yaml --reporter trivy --format generic -o -
{
"vulnerabilities" : [ {
"id" : "CVE-2022-22965",
"expires_at" : "2027-03-31",
"statement" : "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."
} ]
}
For the fields, see Generic format. To apply the file to a scanner, see Use generic suppression files.
If you use Snyk or cargo-audit
Snyk only reads Snyk IDs, and cargo-audit only reads RUSTSEC IDs.
Add the scanner’s ID to the report with vuln_ids.
Snyk reports the lodash vulnerability CVE-2021-23337 as SNYK-JS-LODASH-1040724:
- reporter: snyk
at: 2026-03-11
vuln_ids: [SNYK-JS-LODASH-1040724]
suppress: {}
The generated .snyk lists the Snyk ID:
$ vulnlog suppress acme-shop.vl.yaml --reporter snyk -o -
# Generated by Vulnlog (https://vulnlog.dev). DO NOT EDIT.
---
version: v1.25.0
ignore:
SNYK-JS-LODASH-1040724:
- '*':
reason: >-
The template function is only used in the admin interface, with templates that administrators write. Administrators
can already change the shop configuration, so the injection gives them no additional access. The admin interface
is removed in Acme Shop 5.0.
For a Rust crate, the entry’s id can be the RUSTSEC ID itself.
For the IDs each format holds, see Supported scanners.
If a suppression expired
From the day after expires_at, the scanner reports the finding again.
Run suppress with -v to find the expired suppressions.
In this output, the Trivy suppression of Spring4Shell ended on 1 November 2026:
$ vulnlog -v suppress acme-shop.vl.yaml --reporter trivy -o - > /dev/null
verbose: parsed acme-shop.vl.yaml: schema version 1, releases: 3, tags: 4, vulnerabilities: 6
verbose: reporter filter: trivy
verbose: skipped CVE-2022-22965 for reporter trivy: suppression expired on 2026-11-01
verbose: wrote <stdout>: trivy format, 0 entries
Then analyse the finding again and choose one of these:
-
The fix has shipped: record the resolution. See Record a resolution.
-
You need more time: set a new
expires_at, and updateanalysisandanalyzed_atif your analysis changed. -
You accept the risk: change the disposition to
wont fixand removeexpires_at, so the block readssuppress: {}.
vulnlog validate doesn’t warn about expired suppressions.
To see the end dates that are coming up, search the file for expires_at.
If you scan one component or one release
Filter with --tag or --as-of.
With --tag frontend, only entries tagged frontend are suppressed, and Vulnlog still writes a file for every scanner.
With --as-of 4.3.0, a resolution in a later release doesn’t count yet.
For the filter options, see Filter options.
If you scan a release without the fix
Suppose the Acme Shop file records that 4.4.0 fixes Spring4Shell (CVE-2022-22965).
A scanner that checks 4.3.0 still finds the old spring-beans.
To keep the suppression until 4.4.0 ships, generate the file as of 4.3.0.
The resolution then doesn’t count yet, and the suppress block of the report still applies:
$ vulnlog suppress acme-shop.vl.yaml --reporter trivy --as-of 4.3.0 -o -
# Generated by Vulnlog (https://vulnlog.dev). DO NOT EDIT.
---
vulnerabilities:
- id: CVE-2022-22965
expired_at: 2027-03-31
statement: >-
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.
Without a suppress block on the report, the entry isn’t suppressed, with or without --as-of.
To record the release with the fix, see Record a resolution.
If you use the Gradle plugin
Run vulnlogSuppress.
It writes the files to build/vulnlog/suppressions by default:
$ ./gradlew vulnlogSuppress
The task takes a single Vulnlog file. For its settings, see Gradle plugin.
Check the result
-
Run with
-vto see how many entries each file has and which entries Vulnlog left out:$ vulnlog -v suppress acme-shop.vl.yaml --output-dir build/suppressions verbose: parsed acme-shop.vl.yaml: schema version 1, releases: 3, tags: 4, vulnerabilities: 6 verbose: skipped CVE-2024-3094 for reporter other: no suppression format available Wrote: build/suppressions/github-dependabot.generic.json verbose: wrote build/suppressions/github-dependabot.generic.json: generic format, 0 entries Wrote: build/suppressions/dependency-check-suppressions.xml verbose: wrote build/suppressions/dependency-check-suppressions.xml: dependency-check format, 1 entry Wrote: build/suppressions/.trivyignore.yaml verbose: wrote build/suppressions/.trivyignore.yaml: trivy format, 1 entry Wrote: build/suppressions/npm-audit.generic.json verbose: wrote build/suppressions/npm-audit.generic.json: generic format, 1 entry Wrote: build/suppressions/grype.generic.json verbose: wrote build/suppressions/grype.generic.json: generic format, 0 entriesReports from
other, such as customer inquiries, never get a suppression file. -
Run the scanner. It no longer reports the suppressed findings, and it still reports everything else.
For how Vulnlog and your scanners work together, see Vulnlog and your scanner.