owasp-amass/amass · error
invalid key delimiter: %s
Error message
invalid key delimiter: %s
What it means
Transformation.Split expects a key containing exactly one '->' delimiter separating the From and To components; anything else returns this error naming the key. It enforces the 'from->to' transformation key format.
Source
Thrown at config/transform.go:111
return fmt.Errorf("invalid type for priority in default_transform_values")
}
}
return nil
}
// Split splits the key into 'From' and 'To' components, expecting a "->" delimiter.
// Requires a non-nil Transformation pointer and a valid key format. Example: FQDN->IPaddress.
func (t *Transformation) Split(key string) error {
if t.From != "" && t.To != "" {
t.From = strings.ToLower(t.From)
t.To = strings.ToLower(t.To)
return nil // Already split
}
// Split the key into 'From' and 'To' components, expecting a "->" delimiter.
parts := strings.Split(key, "->")
if len(parts) != 2 {
return fmt.Errorf("invalid key delimiter: %s", key)
}
// Assign the 'From' and 'To' values to the Transformation struct.
t.From = strings.ToLower(parts[0])
t.To = strings.ToLower(parts[1])
return nil
}
// Validate checks the validity of a given transformation with respect to OAM &
// previously registered transformations. The function ensures OAM compliance & that there are no conflicts
// between transformations with 'none' (indicating no action) and other valid transformations
// for the same 'From' type.
func (t *Transformation) Validate(c *Config) error {
if c.fromWithNone == nil {
c.fromWithNone = make(map[string]bool)
}
if c.fromWithValid == nil {
c.fromWithValid = make(map[string]bool)
}View on GitHub (pinned to 79299dce87)
Solutions
- Format the key as 'from->to' with exactly one '->' delimiter
- Split chained transformations into separate entries
- Normalize the key: strings.Count(key, "->") == 1 check before calling Split
Example fix
// before
cfg.Transformations["subdomain>ip"] = &Transformation{}
// after
cfg.Transformations["subdomain->ip"] = &Transformation{} Defensive patterns
Strategy: validation
Validate before calling
func validTransformKey(key string) bool {
parts := strings.Split(key, "->")
return len(parts) == 2 && parts[0] != "" && parts[1] != ""
} Try / catch
if err := t.Split(key); err != nil {
if strings.Contains(err.Error(), "invalid key delimiter") {
return fmt.Errorf("transformation key %q must use '->' exactly once", key)
}
return err
} Prevention
- Always use '->' exactly once in transformation keys
- Avoid alternate arrows like '=>', '>', or '→'
- Normalize keys programmatically before constructing Transformation objects
When it happens
Trigger: Calling Split (directly or via loadTransformSettings) with keys like 'a>b', 'a', 'a->b->c', 'a - > b', or keys using a different arrow notation.
Common situations: Hand-writing transformation entries in amass config YAML with wrong delimiters, or programmatic key construction that concatenates multiple hops into one key.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- %s is not a valid IP address or range
- %s is not a valid IP
- %s is not a valid IP range
- brute forcing cannot be performed without DNS resolution
- active enumeration cannot be performed without DNS resolutio
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/1dcb5a9cce134dd7.
Report an issue: GitHub.