{"record":{"id":"1dcb5a9cce134dd7","repo":"owasp-amass/amass","slug":"invalid-key-delimiter-s","errorCode":null,"errorMessage":"invalid key delimiter: %s","messagePattern":"invalid key delimiter: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/transform.go","lineNumber":111,"sourceCode":"\t\t\treturn fmt.Errorf(\"invalid type for priority in default_transform_values\")\n\t\t}\n\n\t}\n\treturn nil\n}\n\n// Split splits the key into 'From' and 'To' components, expecting a \"->\" delimiter.\n// Requires a non-nil Transformation pointer and a valid key format. Example: FQDN->IPaddress.\nfunc (t *Transformation) Split(key string) error {\n\tif t.From != \"\" && t.To != \"\" {\n\t\tt.From = strings.ToLower(t.From)\n\t\tt.To = strings.ToLower(t.To)\n\t\treturn nil // Already split\n\t}\n\t// Split the key into 'From' and 'To' components, expecting a \"->\" delimiter.\n\tparts := strings.Split(key, \"->\")\n\tif len(parts) != 2 {\n\t\treturn fmt.Errorf(\"invalid key delimiter: %s\", key)\n\t}\n\t// Assign the 'From' and 'To' values to the Transformation struct.\n\tt.From = strings.ToLower(parts[0])\n\tt.To = strings.ToLower(parts[1])\n\treturn nil\n}\n\n// Validate checks the validity of a given transformation with respect to OAM &\n// previously registered transformations. The function ensures OAM compliance & that there are no conflicts\n// between transformations with 'none' (indicating no action) and other valid transformations\n// for the same 'From' type.\nfunc (t *Transformation) Validate(c *Config) error {\n\tif c.fromWithNone == nil {\n\t\tc.fromWithNone = make(map[string]bool)\n\t}\n\tif c.fromWithValid == nil {\n\t\tc.fromWithValid = make(map[string]bool)\n\t}","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/transform.go#L93-L129","documentation":"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.","triggerScenarios":"Calling Split (directly or via loadTransformSettings) with keys like 'a>b', 'a', 'a->b->c', 'a - > b', or keys using a different arrow notation.","commonSituations":"Hand-writing transformation entries in amass config YAML with wrong delimiters, or programmatic key construction that concatenates multiple hops into one key.","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"],"exampleFix":"// before\ncfg.Transformations[\"subdomain>ip\"] = &Transformation{}\n// after\ncfg.Transformations[\"subdomain->ip\"] = &Transformation{}","handlingStrategy":"validation","validationCode":"func validTransformKey(key string) bool {\n\tparts := strings.Split(key, \"->\")\n\treturn len(parts) == 2 && parts[0] != \"\" && parts[1] != \"\"\n}","typeGuard":null,"tryCatchPattern":"if err := t.Split(key); err != nil {\n\tif strings.Contains(err.Error(), \"invalid key delimiter\") {\n\t\treturn fmt.Errorf(\"transformation key %q must use '->' exactly once\", key)\n\t}\n\treturn err\n}","preventionTips":["Always use '->' exactly once in transformation keys","Avoid alternate arrows like '=>', '>', or '→'","Normalize keys programmatically before constructing Transformation objects"],"tags":["config","transformation","validation","amass"],"backgroundTag":"invalid-argument-format","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"}