Skip to content

fix(ci): Trivy CRITICAL gate should fail only on critical vulns#1053

Merged
ogazboiz merged 1 commit into
mainfrom
fix/trivy-limit-severities
Jun 1, 2026
Merged

fix(ci): Trivy CRITICAL gate should fail only on critical vulns#1053
ogazboiz merged 1 commit into
mainfrom
fix/trivy-limit-severities

Conversation

@ogazboiz
Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz commented Jun 1, 2026

Why

The Deploy Staging CRITICAL - fail Trivy step uses format: sarif. With SARIF output the trivy-action builds the report with all severities (Building SARIF report with all severities in the logs), so exit-code: 1 trips on any vulnerability present — the existing HIGH axios advisories — rather than on CRITICAL findings as the step name and severity: CRITICAL intend.

There are no critical vulnerabilities in the image (the uploaded SARIF tops out at HIGH: axios, minimatch, brace-expansion, etc.), so the deploy fails on a gate that should pass.

This was masked until now because the scan never actually ran (image-ref casing, #1050) — fixing that exposed the misconfigured gate.

Fix

Add limit-severities-for-sarif: 'true' so the scan and the exit-code honour the severity: CRITICAL filter and the gate fails only on genuine CRITICAL findings. HIGH advisories are still surfaced by the warn-only step above.

Verification

Deploy Staging is push-to-main only, so this runs on the post-merge run, not the PR. Change is limited to the workflow; it does not touch the PR-gating RemitLend CI.

…lities

The "CRITICAL - fail" Trivy step uses format: sarif. With sarif output the
trivy-action builds the report with ALL severities ("Building SARIF report with
all severities"), so the exit-code: 1 trips on any vulnerability present — the
existing HIGH axios advisories — rather than on CRITICAL findings as the step
name and severity: CRITICAL intend. There are no critical vulnerabilities in
the image (the SARIF tops out at HIGH), so the staging deploy fails on a gate
that should have passed.

Add limit-severities-for-sarif: 'true' so the scan and the exit-code honour the
severity filter and the gate fails only on genuine CRITICAL findings. HIGH
advisories are still surfaced by the warn-only step above.
@ogazboiz ogazboiz merged commit 3833018 into main Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant