ci(security): split trivy-fs severity into two steps#269
Merged
Conversation
Replace the single-step `trivy-fs` job with a two-step pattern so the policy matches its stated intent: - CRITICAL findings hard-gate the merge (`exit-code: 1`) - HIGH findings surface as annotations only (`exit-code: 0`, `if: always()`) The previous `severity: "CRITICAL,HIGH"` + `exit-code: "1"` configuration gated on BOTH severities (the `exit-code` applies to ANY finding matching the `severity` filter), conflicting with the inline comment that claimed HIGH was annotation-only. `if: always()` on the HIGH step is load-bearing — without it, a CRITICAL failure skips the HIGH-annotation step entirely, which would actually weaken HIGH visibility relative to the previous single-step form. Same split applied to `trivy-fs-nightly.yml` so the policy is uniform across PR + scheduled triggers. Closes #268
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trivy-fsjob's severity scan into two steps: CRITICAL gates merge (exit-code: 1), HIGH is annotation-only (exit-code: 0,if: always())trivy-fs-nightly.ymlso the policy is uniform across PR + scheduled triggersIssue: Closes #268
Why
The previous job's inline comment claimed:
Combined with
severity: "CRITICAL,HIGH"andexit-code: "1", the policy gated on BOTH severities (theexit-codeapplies to any finding matching theseverityfilter). For a "CRITICAL gates, HIGH informs" intent — which a sibling Python/uv-based service runs — the config was one step short.This PR splits the step in two so:
The
if: always()on the HIGH step is load-bearing — without it, a CRITICAL failure would skip HIGH visibility entirely, which would actually weaken HIGH-finding reporting compared to the original single-step form.Test plan
ci-gatejob remains green;needs:list still includestrivy-fs(single job name unchanged — splitting steps does not split the job)trivy-fs-nightlyvia workflow_dispatch after merge; both steps runVerification (post-merge):
gh workflow run "Trivy fs nightly sweep" -R frecar/epguides-api gh run list -R frecar/epguides-api --workflow trivy-fs-nightly.yml --limit 1No design surface
Mechanical replication of a two-step trivy gating pattern that's been deployed and validated in a sibling Python service. Public-repo discipline: the PR body intentionally avoids referencing internal cluster context.