Skip to content

feat(trivy): default severity to all levels for cross-scanner dedup#42

Merged
sg0nzalez merged 1 commit into
mainfrom
feat/trivy-default-all-severities
Jun 17, 2026
Merged

feat(trivy): default severity to all levels for cross-scanner dedup#42
sg0nzalez merged 1 commit into
mainfrom
feat/trivy-default-all-severities

Conversation

@sg0nzalez

@sg0nzalez sg0nzalez commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Change Muninn’s default Trivy severity from CRITICAL,HIGH to all Trivy levels (UNKNOWN through CRITICAL), matching Trivy’s native --severity default.
  • osv-scanner and Trivy now overlap on medium/low npm advisories out of the box, so cross-scanner dedup and PR comment Detected by lines work without extra consumer config.
  • Consumers can still narrow what Trivy reports via scanners.trivy.severity; fail-on remains the knob for which findings fail the run.

Motivation

Consumer repos (e.g. flightlogs-web) were seeing dependency findings with Detected by: osv-scanner only. That was expected: Trivy’s old default filtered out medium/low severities while osv-scanner reported everything. Widening the default follows a scan wide, fail narrow model.

What changed

  • internal/config.DefaultTrivySeverities — single source of truth for the default list
  • Defaults() and trivy.buildArgs() — use all levels when no override is set
  • Docs, tests, muninn.yml, and CI dedup workflow updated for v0.3.3

Consumer impact

Before After
Trivy default: CRITICAL, HIGH Trivy default: all levels
Medium/low deps often osv-only osv + trivy dedup by default
fail-on: critical (default) unchanged

Repos that want the old behavior can opt in:

yaml
scanners:
  trivy:
    severity: [CRITICAL, HIGH]
    ignore-unfixed: true

Note: defining scanners: replaces the entire scanner map — list every scanner you still want enabled.

Test plan

  • go test ./...
  • go test ./integration/...
  • CI green on PR
  • Spot-check a consumer repo PR comment shows Detected by: osv-scanner, trivy on shared medium/low advisories

Scan wide with Trivy (UNKNOWN through CRITICAL) so osv-scanner overlaps on
medium/low advisories by default; consumers can still narrow via
scanners.trivy.severity while fail-on controls CI exit behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sg0nzalez sg0nzalez self-assigned this Jun 17, 2026
@github-actions

Copy link
Copy Markdown

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@sg0nzalez sg0nzalez merged commit de7174d into main Jun 17, 2026
7 checks passed
@sg0nzalez sg0nzalez deleted the feat/trivy-default-all-severities branch June 17, 2026 14:47
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