owasp-amass/amass · error
failed to extract the FQDN asset
Error message
failed to extract the FQDN asset
What it means
Thrown by the sitedossier scrape plugin's check method when the event's Entity.Asset is not an *oamdns.FQDN. Sitedossier lookups require an FQDN asset; other asset types fail the type assertion and produce this error. It reflects an unexpected asset type in the event stream, not a Sitedossier failure.
Source
Thrown at engine/plugins/scrape/sitedossier.go:78
Transforms: []string{string(oam.FQDN)},
EventType: oam.FQDN,
Callback: sd.check,
}); err != nil {
return err
}
sd.log.Info("Plugin started")
return nil
}
func (sd *siteDossier) Stop() {
sd.log.Info("Plugin stopped")
}
func (sd *siteDossier) check(e *et.Event) error {
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
if !ok {
return errors.New("failed to extract the FQDN asset")
}
if !support.HasSLDInScope(e) {
return nil
}
since, err := support.TTLStartTime(e.Session.Config(), string(oam.FQDN), string(oam.FQDN), sd.name)
if err != nil {
return err
}
var names []*dbt.Entity
if !support.AssetMonitoredWithinTTL(e.Session, e.Entity, sd.source, since) {
names = append(names, sd.query(e, fqdn.Name)...)
support.MarkAssetMonitored(e.Session, e.Entity, sd.source)
}
if len(names) > 0 {View on GitHub (pinned to 79299dce87)
Solutions
- Filter events so only FQDN assets reach the sitedossier plugin
- Confirm the upstream plugin still emits *oamdns.FQDN assets
- Return nil instead of an error when the asset type is unsupported
- Log the actual asset type to trace which producer sent the wrong event
Example fix
// before
if !ok {
return errors.New("failed to extract the FQDN asset")
}
// after
if !ok {
return nil // skip events without FQDN assets
} Defensive patterns
Strategy: type-guard
Validate before calling
if fqdn, ok := e.Entity.Asset.(*oamdns.FQDN); !ok {
return nil
} Type guard
func extractFQDN(e *et.Event) (*oamdns.FQDN, bool) {
fqdn, ok := e.Entity.Asset.(*oamdns.FQDN)
return fqdn, ok
} Try / catch
if err := plugin.Check(e); err != nil {
if strings.Contains(err.Error(), "failed to extract the FQDN asset") {
continue
}
return err
} Prevention
- Register the plugin only for FQDN-asset events
- Verify upstream plugin outputs after upgrades
- Skip silently on asset-type mismatches
- Log the concrete asset type on mismatch for diagnostics
When it happens
Trigger: An event with a non-FQDN asset (IPAddress, Netblock, etc.) reaches sd.check, so fqdn, ok := e.Entity.Asset.(*oamdns.FQDN) fails.
Common situations: Broad event subscriptions routing non-FQDN events to the plugin; custom pipeline code injecting non-FQDN assets; upstream plugin changes that emit different asset types.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
- failed to extract the FQDN asset
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/4f32d495d914a418.
Report an issue: GitHub.