{"record":{"id":"4f32d495d914a418","repo":"owasp-amass/amass","slug":"failed-to-extract-the-fqdn-asset-4f32d4","errorCode":null,"errorMessage":"failed to extract the FQDN asset","messagePattern":"failed to extract the FQDN asset","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/plugins/scrape/sitedossier.go","lineNumber":78,"sourceCode":"\t\tTransforms:   []string{string(oam.FQDN)},\n\t\tEventType:    oam.FQDN,\n\t\tCallback:     sd.check,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tsd.log.Info(\"Plugin started\")\n\treturn nil\n}\n\nfunc (sd *siteDossier) Stop() {\n\tsd.log.Info(\"Plugin stopped\")\n}\n\nfunc (sd *siteDossier) check(e *et.Event) error {\n\tfqdn, ok := e.Entity.Asset.(*oamdns.FQDN)\n\tif !ok {\n\t\treturn errors.New(\"failed to extract the FQDN asset\")\n\t}\n\n\tif !support.HasSLDInScope(e) {\n\t\treturn nil\n\t}\n\n\tsince, err := support.TTLStartTime(e.Session.Config(), string(oam.FQDN), string(oam.FQDN), sd.name)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar names []*dbt.Entity\n\tif !support.AssetMonitoredWithinTTL(e.Session, e.Entity, sd.source, since) {\n\t\tnames = append(names, sd.query(e, fqdn.Name)...)\n\t\tsupport.MarkAssetMonitored(e.Session, e.Entity, sd.source)\n\t}\n\n\tif len(names) > 0 {","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/scrape/sitedossier.go#L60-L96","documentation":"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.","triggerScenarios":"An event with a non-FQDN asset (IPAddress, Netblock, etc.) reaches sd.check, so fqdn, ok := e.Entity.Asset.(*oamdns.FQDN) fails.","commonSituations":"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.","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"],"exampleFix":"// before\nif !ok {\n\treturn errors.New(\"failed to extract the FQDN asset\")\n}\n// after\nif !ok {\n\treturn nil // skip events without FQDN assets\n}","handlingStrategy":"type-guard","validationCode":"if fqdn, ok := e.Entity.Asset.(*oamdns.FQDN); !ok {\n\treturn nil\n}","typeGuard":"func extractFQDN(e *et.Event) (*oamdns.FQDN, bool) {\n\tfqdn, ok := e.Entity.Asset.(*oamdns.FQDN)\n\treturn fqdn, ok\n}","tryCatchPattern":"if err := plugin.Check(e); err != nil {\n\tif strings.Contains(err.Error(), \"failed to extract the FQDN asset\") {\n\t\tcontinue\n\t}\n\treturn err\n}","preventionTips":["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"],"tags":["go","type-assertion","fqdn","plugin"],"backgroundTag":"incompatible-source-type","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}