{"record":{"id":"ebcbbc6aee4a765b","repo":"goharbor/harbor","slug":"no-way-to-get-report-summaries-for-nil-artifact-ebcbbc","errorCode":null,"errorMessage":"no way to get report summaries for nil artifact","messagePattern":"no way to get report summaries for nil artifact","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/scan/vulnerability/vul.go","lineNumber":276,"sourceCode":"}\n\n// URLParameter vulnerability doesn't require any scan report parameters\nfunc (h *scanHandler) URLParameter(_ *v1.ScanRequest) (string, error) {\n\treturn \"\", nil\n}\n\nfunc (h *scanHandler) Update(ctx context.Context, uuid string, rpt string) error {\n\treportMgr := h.ReportMgrFunc()\n\tif err := reportMgr.UpdateReportData(ctx, uuid, rpt); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (h *scanHandler) GetSummary(ctx context.Context, ar *artifact.Artifact, mimeTypes []string) (map[string]any, error) {\n\tbc := h.ScanControllerFunc()\n\tif ar == nil {\n\t\treturn nil, errors.New(\"no way to get report summaries for nil artifact\")\n\t}\n\t// Get reports first\n\trps, err := bc.GetReport(ctx, ar, mimeTypes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsummaries := make(map[string]any, len(rps))\n\tfor _, rp := range rps {\n\t\tsum, err := report.GenerateSummary(rp)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif s, ok := summaries[rp.MimeType]; ok {\n\t\t\tr, err := report.MergeSummary(rp.MimeType, s, sum)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/scan/vulnerability/vul.go#L258-L294","documentation":"Error \"no way to get report summaries for nil artifact\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/scan/vulnerability/vul.go:276 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}