Skip to content

Commit e86e5d1

Browse files
authored
fix(ci): limit Trivy SARIF severities to CRITICAL,HIGH (#101)
Without `limit-severities-for-sarif: true`, the trivy-action overrides `TRIVY_SEVERITY` to all severities when `format: sarif`, which causes `exit-code: 1` to fire on MEDIUM/LOW findings as well — the explicit `severity: CRITICAL,HIGH` input is effectively ignored. The v2.0.0a0 build went red on a MEDIUM idna CVE-2026-45409 for this reason; with the new flag, both the SARIF report and the exit-code gate honour the configured CRITICAL/HIGH filter.
1 parent 9444999 commit e86e5d1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ jobs:
110110
format: sarif
111111
output: trivy-results.sarif
112112
severity: "CRITICAL,HIGH"
113+
# Without this, `format: sarif` causes trivy-action to override
114+
# TRIVY_SEVERITY to include all severities ("Building SARIF report
115+
# with all severities"), which makes `exit-code: 1` fire on
116+
# MEDIUM/LOW findings too — defeating the `severity` filter.
117+
limit-severities-for-sarif: true
113118
# Skip CVEs without an upstream fix. Slim base images frequently
114119
# carry HIGH OS CVEs (libcap2, ncurses-bin, libudev1, ...) that
115120
# have no fixed Debian version yet — gating CI on these would mean

0 commit comments

Comments
 (0)