goharbor/harbor · error
missing report JSON data
Error message
missing report JSON data
What it means
Scan report manager UpdateReportData refuses an empty report body: there is nothing to store for the report row identified by uuid, so the update would be a no-op hiding a scanner that produced no output.
Solutions
- Pass the raw scan report JSON produced by the scanner adapter
- If the scanner legitimately returned nothing, log and investigate upstream instead of calling UpdateReportData
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/pkg/scan/report/manager.go:194 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/db126cb83bb85f90.
Report an issue: GitHub.
Appendix: source
Thrown at src/pkg/scan/report/manager.go:194
kws["mime_type__in"] = mimeTypes
}
// Query all
query := &q.Query{
PageNumber: 0,
Keywords: kws,
}
return bm.dao.List(ctx, query)
}
// UpdateReportData ...
func (bm *basicManager) UpdateReportData(ctx context.Context, uuid string, report string) error {
if len(uuid) == 0 {
return errors.New("missing uuid")
}
if len(report) == 0 {
return errors.New("missing report JSON data")
}
return bm.dao.UpdateReportData(ctx, uuid, report)
}
// DeleteByDigests ...
func (bm *basicManager) DeleteByDigests(ctx context.Context, digests ...string) error {
if len(digests) == 0 {
// Nothing to do
return nil
}
// delete the vulnerability records to the report UUID mapping for the digests
// provided
_, err := bm.vulnDao.DeleteForDigests(ctx, digests...)
if err != nil {
return errView on GitHub (pinned to 7b2fd08cc5)