Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
fix: scan timeout not working
Browse files Browse the repository at this point in the history
  • Loading branch information
paralta authored and chrisgacsal committed Aug 9, 2023
1 parent 269e460 commit 84f0c81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/orchestrator/scanconfigwatcher/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion pkg/orchestrator/scanwatcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 84f0c81

Please sign in to comment.