Skip to main content
An exception excludes a package from scan results and reports. Use it for false positives, accepted risks during remediation, or legacy dependencies being migrated. This page is the reference for the exceptions file and the flags that work with it.
An excepted package is skipped entirely, including any future issues it develops. Every exception must carry an expiry date; permanent exceptions are not allowed. Exceptions also cannot be scoped to a whole manifest, only to specific packages.

Exceptions file format

An exceptions file lists packages by ecosystem, name, and version, each with a unique id and an expires timestamp:
Supported ecosystems include npm, PyPI, Maven, Go, RubyGems, Cargo, NuGet, Packagist, Hex, Pub, GitHubActions, Terraform, VSCodeExtensions, OpenVSXExtensions, and Homebrew. For the authoritative list, see the Vet source.

Generating exceptions

Generate an exceptions file from a JSON dump using a CEL filter. For example, except packages that have no critical or high vulnerabilities:
Review the generated file before using it, and do not pass --exceptions while generating, or the active exceptions will skew the output.

Applying exceptions

Pass an exceptions file to vet as a global flag:
With vet-action, commit the file (conventionally .github/vet/exceptions.yml) and reference it:

Matching rules

  • Exceptions apply at the package level and are shared across all analyzers and reporters.
  • Comparisons are case-insensitive, except version, which matches exactly unless set to *.
  • The first matching exception applies.
  • Expired exceptions are ignored, and an exception cannot be created without an expiry date.

Filtering

The CEL expressions used in --exceptions-filter.

Build Your Own Queries

The JSON dump and query workflow exceptions build on.

Policy as Code

Enforce policy on the packages that remain.

vet-action

Configure exceptions in GitHub Actions.