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

  1. Filter events so only FQDN assets reach the sitedossier plugin
  2. Confirm the upstream plugin still emits *oamdns.FQDN assets
  3. Return nil instead of an error when the asset type is unsupported
  4. 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

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


AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06). Data as JSON: /api/errors/4f32d495d914a418. Report an issue: GitHub.