true. This page is the reference for the filter input and CEL syntax. For the concept, see CEL.
The
vet scan --filter examples below use Vet’s original filter interface. Vet also ships a newer --policy engine with a different input schema; see the Vet repository for its format.Running a filter
Filter a scan directly, or filter cached results from a JSON dump:--filter-fail to exit non-zero when any package matches, for CI/CD gating.
Filter input
Each expression receives these variables:| Variable | Content |
|---|---|
_ | Root variable holding the others |
pkg | Package info: pkg.ecosystem, pkg.name, pkg.version |
vulns | Vulnerabilities by severity: vulns.all, vulns.critical, vulns.high, vulns.medium, vulns.low |
scorecard | OpenSSF Scorecard: scorecard.score, scorecard.scores["Check-Name"] |
projects | Source projects, each with stars, forks, issues, type |
licenses | SPDX license codes |
Input example
A filter sees each package as a structured input:CEL syntax
Functions:size() (array or map length), exists(var, condition) (any element matches), in (membership), contains(), startsWith() / endsWith().
Operators: == != < <= > >= (comparison), && || ! (logical), + - * / (arithmetic).
Types: booleans (true / false), double-quoted strings, numbers, arrays (["a", "b"]), and maps ({"key": "value"}).
Example expressions
CEL
What CEL is and how SafeDep uses it.
Policy as Code
Combine expressions into reusable policy files.
Build Your Own Queries
Filter cached scan data with the query workflow.
OpenSSF Scorecard
The scorecard checks referenced in scores.

