feat(security): size the rescan from measured scan times

The confirmation for a full rescan used a fixed guess of 10 seconds per
artifact. Scans now record their wall time in scan_results. The new
GET /api/admin/rescan/estimate returns the artifact count of each scope
and the time at the configured concurrency, from the average of recent
scans. While a rescan runs, the status reports elapsed time and an ETA,
and the panel shows the live rate.
This commit is contained in:
2026-11-24 02:49:28 +00:00
parent e80489e55c
commit c685131865
14 changed files with 360 additions and 19 deletions
+1
View File
@@ -502,6 +502,7 @@ func (a *App) setupServer() error {
// Admin endpoints (forced rescan)
a.app.Post("/api/admin/rescan", a.requireAdmin, a.handleRescanTrigger)
a.app.Get("/api/admin/rescan/status", a.requireAdmin, a.handleRescanStatus)
a.app.Get("/api/admin/rescan/estimate", a.requireAdmin, a.handleRescanEstimate)
// Admin endpoints (API key management)
a.app.Post("/api/admin/keys", a.requireAdmin, a.handleGenerateAPIKey)