owasp-amass/amass · warning

asset type not supported: %s

Error message

asset type not supported: %s

What it means

The registration-records check in the horizontals plugin switches on the asset's OAM record type to pick a relation label (registrant / registrant_contact). If the entity's asset type is none of the supported kinds, it returns this error naming the unsupported type. It is an explicit guard that unsupported assets do not enter the registration-record pipeline.

Source

Thrown at engine/plugins/horizontals/reg_records.go:42

func (h *horRegRec) check(e *et.Event) error {
	var rlabel string
	t := e.Entity.Asset.AssetType()

	// check if scope expansion is allowed
	if e.Session.Config().Rigid {
		return nil
	}

	switch t {
	case oam.AutnumRecord:
		rlabel = "registrant"
	case oam.DomainRecord:
		rlabel = "registrant_contact"
	case oam.IPNetRecord:
		rlabel = "registrant"
	default:
		return fmt.Errorf("asset type not supported: %s", t)
	}

	cr, err := h.plugin.getContactRecord(e.Session, e.Entity, rlabel)
	if err != nil {
		return nil
	}

	orgs, locs := h.plugin.lookupContactRecordOrgsAndLocations(e.Session, cr)
	if len(orgs) == 0 && len(locs) == 0 {
		return nil
	}

	switch t {
	case oam.AutnumRecord:
		h.processAutnumRecord(e, orgs, locs)
	case oam.DomainRecord:
		h.processDomainRecord(e, orgs, locs)
	case oam.IPNetRecord:

View on GitHub (pinned to 79299dce87)

Solutions

  1. Filter events/assets upstream so only registration-record assets (Identifier/Domain/IPNet records) reach check().
  2. Add a case for the new asset type in the switch if it should be supported (with an appropriate rlabel).
  3. Log the unsupported type and return nil instead of an error if unsupported assets are expected and harmless.
  4. Check the emitting plugin to see why it is delivering the wrong asset type to this handler.

Example fix

// before
default:
	return fmt.Errorf("asset type not supported: %s", t)
// after
default:
	return fmt.Errorf("reg_records: asset type not supported: %s", t) // and filter the subscription upstream so only registration records arrive
Defensive patterns

Strategy: type-guard

Validate before calling

switch e.Entity.Asset.(type) {
case oam.IdentifierRecord, oam.DomainRecord, oam.IPNetRecord:
	// supported
default:
	// skip before calling check()
}

Type guard

func isRegistrationRecord(a oam.Asset) bool {
	switch a.(type) {
	case oam.IdentifierRecord, oam.DomainRecord, oam.IPNetRecord:
		return true
	}
	return false
}

Try / catch

if err := check(e); err != nil {
	if strings.Contains(err.Error(), "asset type not supported") {
		// expected for non-registration assets: skip
		return nil
	}
}

Prevention

When it happens

Trigger: check() is invoked with an entity whose Asset concrete type is not oam.IdentifierRecord, oam.DomainRecord, or oam.IPNetRecord (e.g., oam.FQDN, oam.IPAddress, or another record type), hitting the default branch with the type name in %s.

Common situations: Event subscriptions wired too broadly so non-registration assets reach check(); a plugin refactor introduces a new OAM record type not yet handled; tests feeding synthetic entities of the wrong asset type; misconfigured scope pushing arbitrary assets into the handler.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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