feat(config): make the first-download scan wait configurable

The cache waited a fixed 30 seconds for a first download's scan, and the app never set the wait. Scanners run one after another, so a deployment with several scanners and fail_closed refused most first downloads. security.scan_wait_timeout now sets the wait; 0 keeps 30 seconds.
This commit is contained in:
2026-11-23 17:37:45 +00:00
parent 13abb140d7
commit 16fb52ed3e
4 changed files with 62 additions and 0 deletions
+1
View File
@@ -242,6 +242,7 @@ func (a *App) initializeComponents() error {
DeletedRetention: a.config.Cache.DeletedRetention,
MaxPackageSize: a.config.Security.Scanners.Static.MaxPackageSize,
FailClosed: a.config.Security.FailClosed,
ScanWaitTimeout: a.config.Security.ScanWaitTimeout,
})
if err != nil {
return fmt.Errorf("failed to initialize cache: %w", err)