goharbor/harbor · warning

report not found, uuid:%v

Error message

report not found, uuid:%v

What it means

Returned while updating a report's severity summary counts: the converter lists reports by UUID with report.Mgr.List and finds none. It means the scan report row that should be updated no longer exists by the time the update runs, typically a delete/retention race.

Source

Thrown at src/pkg/scan/postprocessors/report_converters.go:346

			MediumCnt++
		case vuln.Low:
			LowCnt++
		case vuln.None:
			NoneCnt++
		case vuln.Unknown:
			UnknownCnt++
		}
		if len(v.FixVersion) > 0 {
			FixableCnt++
		}
	}

	reports, err := report.Mgr.List(ctx, q.New(q.KeyWords{"uuid": reportUUID}))
	if err != nil {
		return err
	}
	if len(reports) == 0 {
		return errors.New(nil).WithMessagef("report not found, uuid:%v", reportUUID)
	}
	r := reports[0]

	r.CriticalCnt = CriticalCnt
	r.HighCnt = HighCnt
	r.MediumCnt = MediumCnt
	r.LowCnt = LowCnt
	r.NoneCnt = NoneCnt
	r.FixableCnt = FixableCnt
	r.UnknownCnt = UnknownCnt

	return report.Mgr.Update(ctx, r, "CriticalCnt", "HighCnt", "MediumCnt", "LowCnt", "NoneCnt", "UnknownCnt", "FixableCnt")
}

// CVS ...
type CVS struct {
	CVSS map[string]map[string]any `json:"CVSS"`
}

View on GitHub (pinned to 7b2fd08cc5)

Solutions

  1. Re-run the scan on the artifact if it still exists; a fresh report row will be created and updated normally
  2. Avoid scheduling retention/GC windows overlapping scan_all or bulk scanning
  3. If persistent, check the scan report table for the UUID and DB connectivity/permissions

Example fix

// before
reports, _ := report.Mgr.List(ctx, q.New(q.KeyWords{"uuid": reportUUID}))
if len(reports) == 0 {
    return errors.New(nil).WithMessagef("report not found, uuid:%v", reportUUID)
}

// after
reports, err := report.Mgr.List(ctx, q.New(q.KeyWords{"uuid": reportUUID}))
if err != nil {
    return err
}
if len(reports) == 0 {
    // artifact likely deleted mid-scan; treat as benign and skip summary update
    log.G(ctx).Warningf("report %s gone before summary update", reportUUID)
    return nil
}
Defensive patterns

Strategy: validation

Validate before calling

reports, err := report.Mgr.List(ctx, q.New(q.KeyWords{"uuid": reportUUID}))
if err != nil {
    return err
}
if len(reports) == 0 {
    log.G(ctx).Warningf("report %s deleted before summary update", reportUUID)
    return nil // artifact gone; nothing to update
}

Prevention

When it happens

Trigger: Artifact deleted (or retention/GC ran) between report creation and the summary update; DB cleanup purged scan report rows mid-job; concurrent rescans deleting prior reports for the same digest.

Common situations: Retention or manual artifact deletion racing an in-flight scan job; Harbor DB maintenance removing stale scan data; GC deleting untagged artifacts being scanned.

Related errors


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/0dce90ded04f6a64. Report an issue: GitHub.