diff --git a/pkg/orchestrator/scanconfigwatcher/helpers.go b/pkg/orchestrator/scanconfigwatcher/helpers.go index b56875267..0a9b2b8c6 100644 --- a/pkg/orchestrator/scanconfigwatcher/helpers.go +++ b/pkg/orchestrator/scanconfigwatcher/helpers.go @@ -32,6 +32,7 @@ func newScanFromScanConfig(scanConfig *models.ScanConfig) *models.Scan { AssetScanTemplate: scanConfig.ScanTemplate.AssetScanTemplate, Scope: scanConfig.ScanTemplate.Scope, MaxParallelScanners: scanConfig.ScanTemplate.MaxParallelScanners, + TimeoutSeconds: scanConfig.ScanTemplate.TimeoutSeconds, State: utils.PointerTo(models.ScanStatePending), Summary: &models.ScanSummary{ JobsCompleted: utils.PointerTo(0), diff --git a/pkg/orchestrator/scanwatcher/watcher.go b/pkg/orchestrator/scanwatcher/watcher.go index 5ebe8999b..b77073398 100644 --- a/pkg/orchestrator/scanwatcher/watcher.go +++ b/pkg/orchestrator/scanwatcher/watcher.go @@ -132,7 +132,7 @@ func (w *Watcher) Reconcile(ctx context.Context, event ScanReconcileEvent) error } if scan.IsTimedOut(w.scanTimeout) { - scan.State = utils.PointerTo(models.ScanStateAborted) + scan.State = utils.PointerTo(models.ScanStateFailed) scan.StateMessage = utils.PointerTo("Scan has been timed out") scan.StateReason = utils.PointerTo(models.ScanStateReasonTimedOut)