owasp-amass/amass · error
failed to extract the IP address
Error message
failed to extract the IP address
What it means
getAddr failed to obtain an IPAddress asset: either db.FindEntityById returned an error/no entity, or the entity's Asset could not be asserted to *network.IPAddress. It is a combined lookup-then-type-guard failure, so the ID is stale/unknown or the entity is not an IP address. Callers: NamesToAddrs, oneMoreName, cnameQuery.
Source
Thrown at internal/net/addr.go:119
})
continue loop
}
}
}
}
}
}
return results, nil
}
func getAddr(ctx context.Context, db repository.Repository, ip *dbt.Entity, since time.Time) (*network.IPAddress, error) {
if entity, err := db.FindEntityById(ctx, ip.ID); err == nil && entity != nil {
if ip, ok := entity.Asset.(*network.IPAddress); ok {
return ip, nil
}
}
return nil, errors.New("failed to extract the IP address")
}
func oneMoreName(ctx context.Context, db repository.Repository, fqdn *dbt.Entity, since time.Time) (*network.IPAddress, error) {
if edges, err := db.OutgoingEdges(ctx, fqdn, since, "dns_record"); err == nil && len(edges) > 0 {
for _, edge := range edges {
if rel, ok := edge.Relation.(*oamdns.BasicDNSRelation); ok && (rel.Header.RRType == 1 || rel.Header.RRType == 28) {
return getAddr(ctx, db, edge.ToEntity, since)
}
}
}
return nil, errors.New("failed to traverse the FQDN")
}
func cnameQuery(ctx context.Context, db repository.Repository, fqdn *dbt.Entity, since time.Time) (*network.IPAddress, error) {
set := stringset.New()
defer set.Close()
next := fqdnView on GitHub (pinned to 79299dce87)
Solutions
- Verify the entity ID being passed actually refers to a previously stored IPAddress asset
- Check that the graph/repository connection is healthy so FindEntityById is not erroring
- At call sites, treat this as 'no address resolved' and continue with other DNS edges rather than aborting the traversal
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at internal/net/addr.go:119 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/ead3896ff98cd4dd.
Report an issue: GitHub.