{"record":{"id":"6cb94fba7dce4c60","repo":"owasp-amass/amass","slug":"zero-locations-found","errorCode":null,"errorMessage":"zero locations found","messagePattern":"zero locations found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"engine/plugins/horizontals/plugin.go","lineNumber":335,"sourceCode":"\tif len(results) == 0 {\n\t\treturn nil, errors.New(\"failed to extract the organization\")\n\t}\n\treturn results, nil\n}\n\nfunc (h *horizPlugin) getContactRecordLocations(sess et.Session, cr *dbt.Entity) ([]*dbt.Entity, error) {\n\tsince, err := support.TTLStartTime(sess.Config(),\n\t\tstring(oam.ContactRecord), string(oam.Location), h.name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx, cancel := context.WithTimeout(sess.Ctx(), 5*time.Second)\n\tdefer cancel()\n\n\tedges, err := sess.DB().OutgoingEdges(ctx, cr, since, \"location\")\n\tif err != nil || len(edges) == 0 {\n\t\treturn nil, errors.New(\"zero locations found\")\n\t}\n\n\tseconds := 5 * len(edges)\n\tlctx, cancel := context.WithTimeout(sess.Ctx(), time.Duration(seconds)*time.Second)\n\tdefer cancel()\n\n\tvar results []*dbt.Entity\n\tfor _, edge := range edges {\n\t\tto, err := sess.DB().FindEntityById(lctx, edge.ToEntity.ID)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif _, valid := to.Asset.(*oamcon.Location); valid {\n\t\t\tresults = append(results, to)\n\t\t}\n\t}\n","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/horizontals/plugin.go#L317-L353","documentation":"getContactRecordLocations queries the graph DB for outgoing 'location' edges from a contact record entity within 5 seconds. If the query errors or no edges exist, it returns this error since no locations can be derived for the contact record.","triggerScenarios":"lookupContactRecordOrgsAndLocations processes a contact record that has no location edges in the graph (nothing emitted a location relation for it), or the OutgoingEdges query fails/times out within 5s.","commonSituations":"First-time enumeration where location data has not yet been gathered; data sources that do not provide contact locations; database timeouts on large graphs.","solutions":["Ensure data source plugins that produce location edges run before horizontals","Retry the enumeration so location data gets collected and stored","Increase the 5s context timeout if the DB query times out on large graphs","Handle/skip contact records without locations gracefully in calling code"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"locs, err := getContactRecordLocations(sess, cr)\nif err != nil {\n    if errors.Is(err, errZeroLocations) {\n        return nil // no data yet; not fatal\n    }\n    return err\n}","preventionTips":["Run location-producing data sources before horizontals processing","Re-run enumerations so missing graph data accumulates","Monitor DB query latency; raise the 5s timeout on large graphs"],"tags":["graph-database","plugin","horizontals","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}