{"record":{"id":"0dce90ded04f6a64","repo":"goharbor/harbor","slug":"report-not-found-uuid-v","errorCode":null,"errorMessage":"report not found, uuid:%v","messagePattern":"report not found, uuid:(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/pkg/scan/postprocessors/report_converters.go","lineNumber":346,"sourceCode":"\t\t\tMediumCnt++\n\t\tcase vuln.Low:\n\t\t\tLowCnt++\n\t\tcase vuln.None:\n\t\t\tNoneCnt++\n\t\tcase vuln.Unknown:\n\t\t\tUnknownCnt++\n\t\t}\n\t\tif len(v.FixVersion) > 0 {\n\t\t\tFixableCnt++\n\t\t}\n\t}\n\n\treports, err := report.Mgr.List(ctx, q.New(q.KeyWords{\"uuid\": reportUUID}))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(reports) == 0 {\n\t\treturn errors.New(nil).WithMessagef(\"report not found, uuid:%v\", reportUUID)\n\t}\n\tr := reports[0]\n\n\tr.CriticalCnt = CriticalCnt\n\tr.HighCnt = HighCnt\n\tr.MediumCnt = MediumCnt\n\tr.LowCnt = LowCnt\n\tr.NoneCnt = NoneCnt\n\tr.FixableCnt = FixableCnt\n\tr.UnknownCnt = UnknownCnt\n\n\treturn report.Mgr.Update(ctx, r, \"CriticalCnt\", \"HighCnt\", \"MediumCnt\", \"LowCnt\", \"NoneCnt\", \"UnknownCnt\", \"FixableCnt\")\n}\n\n// CVS ...\ntype CVS struct {\n\tCVSS map[string]map[string]any `json:\"CVSS\"`\n}","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/scan/postprocessors/report_converters.go#L328-L364","documentation":"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.","triggerScenarios":"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.","commonSituations":"Retention or manual artifact deletion racing an in-flight scan job; Harbor DB maintenance removing stale scan data; GC deleting untagged artifacts being scanned.","solutions":["Re-run the scan on the artifact if it still exists; a fresh report row will be created and updated normally","Avoid scheduling retention/GC windows overlapping scan_all or bulk scanning","If persistent, check the scan report table for the UUID and DB connectivity/permissions"],"exampleFix":"// before\nreports, _ := report.Mgr.List(ctx, q.New(q.KeyWords{\"uuid\": reportUUID}))\nif len(reports) == 0 {\n    return errors.New(nil).WithMessagef(\"report not found, uuid:%v\", reportUUID)\n}\n\n// after\nreports, err := report.Mgr.List(ctx, q.New(q.KeyWords{\"uuid\": reportUUID}))\nif err != nil {\n    return err\n}\nif len(reports) == 0 {\n    // artifact likely deleted mid-scan; treat as benign and skip summary update\n    log.G(ctx).Warningf(\"report %s gone before summary update\", reportUUID)\n    return nil\n}","handlingStrategy":"validation","validationCode":"reports, err := report.Mgr.List(ctx, q.New(q.KeyWords{\"uuid\": reportUUID}))\nif err != nil {\n    return err\n}\nif len(reports) == 0 {\n    log.G(ctx).Warningf(\"report %s deleted before summary update\", reportUUID)\n    return nil // artifact gone; nothing to update\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not schedule retention/GC and bulk scans in the same window","Treat missing-report during update as a benign race, log and move on","Correlate scan job logs with artifact deletion events when diagnosing"],"tags":["scan","report","race-condition","not-found"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}