owasp-amass/amass · error
input entity must be of asset type FQDN
Error message
input entity must be of asset type FQDN
What it means
FindByFQDNScope received an entity whose Asset is not an *oamdns.FQDN; the type assertion entity.Asset.(*oamdns.FQDN) failed. Scope expansion walks FQDN assets only, so passing any other asset type (IP address, ASN, domain, etc.) triggers this guard. Callers: lookup and recursive FindByFQDNScope.
Source
Thrown at internal/db/db.go:22
package db
import (
"context"
"errors"
"strings"
"time"
"github.com/caffix/stringset"
"github.com/owasp-amass/asset-db/repository"
dbt "github.com/owasp-amass/asset-db/types"
oamdns "github.com/owasp-amass/open-asset-model/dns"
)
func FindByFQDNScope(ctx context.Context, db repository.Repository, entity *dbt.Entity, since time.Time) ([]*dbt.Entity, error) {
fqdn, valid := entity.Asset.(*oamdns.FQDN)
if !valid {
return nil, errors.New("input entity must be of asset type FQDN")
}
set := stringset.New(entity.Asset.Key())
defer set.Close()
results := []*dbt.Entity{entity}
if edges, err := db.OutgoingEdges(ctx, entity, since, "node"); err == nil && len(edges) > 0 {
for _, edge := range edges {
if to, err := db.FindEntityById(ctx, edge.ToEntity.ID); err == nil && to != nil && !set.Has(to.Asset.Key()) {
if tofqdn, valid := to.Asset.(*oamdns.FQDN); !valid || !strings.HasSuffix(tofqdn.Name, "."+fqdn.Name) {
continue
}
set.Insert(to.Asset.Key())
if findings, err := FindByFQDNScope(ctx, db, to, since); err == nil && len(findings) > 0 {
results = append(results, findings...)
}
}View on GitHub (pinned to 79299dce87)
Solutions
- Filter entities by asset type before calling FindByFQDNScope, e.g. check entity.Asset.(type) == *oamdns.FQDN
- Trace where the non-FQDN entity entered the pipeline (graph query results, plugin output) and constrain that query to FQDN assets
- Use errors.Is/sentinel comparison at the call site to skip rather than abort when mixed asset types are expected
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at internal/db/db.go:22 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/434da7a494ecae2d.
Report an issue: GitHub.