fix(dashboard): Recent Critical widget starved to 2 rows — distinct_cve + deeper feed

Published-date-desc feeder returned the newest 300 per-asset rows, mostly
low/medium; after the CVSS≥8/KEV/EUVD filter only 2 criticals survived.
Same starving Newly Published had — same cure: distinct_cve=true collapses
per-asset duplicates server-side and the deeper window (300) reliably
fills the 10 slots.
This commit is contained in:
2026-07-24 15:35:31 +02:00
parent 1476318624
commit 7851b31af7
+4 -1
View File
@@ -258,7 +258,10 @@ export default function Dashboard() {
// published date desc so the widget actually shows RECENT criticals
// (priority-sorted it pinned the same old 2021 KEV heavyweights
// forever — tester). Client tie-breaks same-day CVEs by CPR desc.
api.get('/api/v1/vulnerabilities?limit=120&status=open&sort_by=published_date&sort_order=desc')
// distinct_cve + deep limit: the newest rows are mostly low/medium,
// so a shallow per-asset window left only 2 criticals (same starving
// Newly Published had before distinct_cve).
api.get('/api/v1/vulnerabilities?limit=300&status=open&sort_by=published_date&sort_order=desc&distinct_cve=true')
.catch(() => ({ data: { items: [] } })),
// EOL / EOS: pseudo-CVEs from endoflife.date check (cve_id
// starts with "EOL-"). Sort by detected_at desc so the freshest EOL