You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --severity to limit the report to the ratings worth acting on
A debian:12 --all scan is 161 findings, and the only way to get the
subset worth waking someone for was jq over --format json. This is
Trivy's spelling: --severity CRITICAL,HIGH, comma-separated or
repeatable, case-insensitive, MODERATE accepted for MEDIUM.
The flag is nearly free -- stringList already splits on commas. All the
work is in what a filter is allowed to hide, because this tool has one
rule it never breaks: a short report must never read as a clean one.
So every filtered run says what it withheld, and glosses the unrated
count. UNKNOWN is a severity you have to name, as in Trivy, and on
debian:12 that hides 36 findings whose only crime is a CVSS v4-only
record -- "36 unknown (no rating was published)" is the line that keeps
that honest. In --repo mode it is worse: govulncheck's OpenVEX carries
no severity, so any --severity that omits UNKNOWN filters out
everything, and that case prints "This is a filtered view, not a clean
result" rather than the ordinary no-findings line.
One exemption: a --cves id that matched no component always survives.
Those rows exist so a hand-typed id cannot vanish; deleting them would
recreate exactly the silence they were written to prevent.
Parsing is strict, via a new cvss.Parse rather than cvss.Normalize --
Normalize("CRITCAL") is UNKNOWN, so the lenient version would read a
typo as a request for precisely the unrated findings. A bad name is
exit 2 before the pull.
The filter runs in the orchestrator, not the renderer, so --format json
shrinks the same way and gains a matching withheld block, and the LLM
overlay is never billed for a row nobody will read. Exit codes are
unchanged: findings existing is still not a failure.
Measured: debian:12 keeps 38 of 161 at CRITICAL,HIGH with the JSON
withheld block agreeing exactly; --repo prints the filtered-view guard
at exit 0; and on rancher/hardened-kubernetes --severity composes with
--vexhub without costing any of its 3 hub matches.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@@ -995,6 +1049,7 @@ be read, or part of the tree could not be read, `2` the command line was wrong.
995
1049
|`--osv-ecosystem`|*(auto)*| Override the OSV ecosystem derived from os-release, e.g. `Debian:12`|
996
1050
|`--roots`|| Extra entrypoints for the closures — shared libraries and language imports; repeatable |
997
1051
|`--vexhub`|| VEX Repository to check findings against, e.g. `https://github.com/rancher/vexhub` (also a raw base URL or a local directory); repeatable, earliest wins — see [VEX hubs](#vex-hubs---vexhub)|
1052
+
|`--severity`|*(all)*| Only report findings at these severities: `CRITICAL`, `HIGH`, `UNKNOWN`, `MEDIUM`, `LOW`, `NONE`; comma-separated or repeatable. `UNKNOWN` must be named to be shown — see [Filtering by severity](#filtering-by-severity---severity)|
998
1053
|`--dlopen-policy`|`taint`|`taint` (block conclusions) or `assume-none`|
999
1054
|`--dynamic-import-policy`|`taint`| The same knob for a language import graph's computed imports. These are far more common than `dlopen`, so `assume-none` discards much more |
1000
1055
|`--trust-import-absence`|`false`| Let a missing dynamic import conclude `not_in_execute_path` (weaker than it looks) |
0 commit comments