owasp-amass/amass · error
failed to extract the FQDN asset
Error message
failed to extract the FQDN asset
What it means
Thrown by the rapiddns scrape plugin's check method when the event's Entity.Asset is not an *oamdns.FQDN. The plugin performs subdomain discovery only for FQDN assets; any other asset type fails the assertion. This is an asset-type routing mismatch, not a RapidDNS API error.
Source
Thrown at engine/plugins/scrape/rapiddns.go:78
Transforms: []string{string(oam.FQDN)},
EventType: oam.FQDN,
Callback: rd.check,
}); err != nil {
return err
}
rd.log.Info("Plugin started")
return nil
}
func (rd *rapidDNS) Stop() {
rd.log.Info("Plugin stopped")
}
func (rd *rapidDNS) 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), rd.name)
if err != nil {
return err
}
var names []*dbt.Entity
if !support.AssetMonitoredWithinTTL(e.Session, e.Entity, rd.source, since) {
names = append(names, rd.query(e, fqdn.Name)...)
support.MarkAssetMonitored(e.Session, e.Entity, rd.source)
}
if len(names) > 0 {View on GitHub (pinned to 79299dce87)
Solutions
- Ensure only FQDN-asset events are dispatched to the rapiddns plugin
- Inspect the producing plugin's asset type and add a converter/selector if needed
- Change the handler to return nil for unsupported asset types
- Add debug logging of e.Entity.Asset type when the assertion fails
Example fix
// before
if !ok {
return errors.New("failed to extract the FQDN asset")
}
// after
if !ok {
return nil // not an FQDN; nothing to do
} Defensive patterns
Strategy: type-guard
Validate before calling
if fqdn, ok := e.Entity.Asset.(*oamdns.FQDN); !ok {
return nil
} Type guard
func asFQDN(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
- Filter events before dispatching to scrape plugins
- Keep asset type expectations aligned with upstream producers
- Return nil for unsupported asset types in check methods
- Add tests that call check with non-FQDN assets
When it happens
Trigger: check receives an event whose asset is not *oamdns.FQDN (e.g. an IPAddress or Service asset), making the type assertion fail before the scope check.
Common situations: Event bus forwarding all asset events to this plugin; custom data sources emitting non-FQDN assets into the scrape pipeline; test code calling check directly with a synthetic non-FQDN event.
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/c39b9702b73b5d37.
Report an issue: GitHub.