feat(api): add /api/system and per-package verdicts

Add a read-only /api/system endpoint with the effective scan policy,
scanner health, rescan, cache and pre-warming settings. It exposes no
credentials or paths.

The package list now carries a verdict (cleared, held, bypassed or
pending) with the reason and the applied bypass. /api/stats adds
bypassed_packages. The vulnerability detail response adds the decision,
a per-scanner severity breakdown and detected_by on each finding.
This commit is contained in:
2026-11-24 00:42:44 +00:00
parent 2b6f3bd892
commit 6ddc382d5b
7 changed files with 477 additions and 14 deletions
+2
View File
@@ -463,6 +463,7 @@ func (a *App) setupServer() error {
a.app.Get("/api/stats/timeseries", mwAuth, a.handleTimeSeriesStats)
a.app.Get("/api/stats/trend", mwAuth, a.handleStatsTrend)
a.app.Get("/api/info", mwAuth, a.handleInfo)
a.app.Get("/api/system", mwAuth, a.handleSystem)
a.app.Get("/api/analytics/top", mwAuth, a.handleAnalyticsTopPackages)
a.app.Get("/api/analytics/trending", mwAuth, a.handleAnalyticsTrendingPackages)
@@ -478,6 +479,7 @@ func (a *App) setupServer() error {
a.app.Get("/api/stats/timeseries", a.handleTimeSeriesStats)
a.app.Get("/api/stats/trend", a.handleStatsTrend)
a.app.Get("/api/info", a.handleInfo)
a.app.Get("/api/system", a.handleSystem)
a.app.Get("/api/analytics/top", a.handleAnalyticsTopPackages)
a.app.Get("/api/analytics/trending", a.handleAnalyticsTrendingPackages)