{"record":{"id":"f7a11e3b52887906","repo":"crowdsecurity/crowdsec","slug":"unknown-transform-s","errorCode":null,"errorMessage":"unknown transform '%s'","messagePattern":"unknown transform '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/appsec/appsec_rule/modsecurity.go","lineNumber":388,"sourceCode":"\t\tr.WriteString(\",deny\")\n\t}\n\n\tr.WriteString(fmt.Sprintf(`,log,msg:'%s',tag:'crowdsec-%s',tag:'cs-custom-rule'`, msg, appsecRuleName))\n\n\tif severity != \"\" && opts.root {\n\t\tr.WriteString(fmt.Sprintf(`,severity:'%s'`, severity))\n\t}\n\n\tfor _, transform := range rule.Transform {\n\t\tif transform == \"\" || (hasCount && transform == \"count\") {\n\t\t\tcontinue\n\t\t}\n\n\t\tr.WriteByte(',')\n\n\t\tmappedTransform, ok := transformMap[transform]\n\t\tif !ok {\n\t\t\treturn \"\", fmt.Errorf(\"unknown transform '%s'\", transform)\n\t\t}\n\n\t\tr.WriteString(mappedTransform)\n\t}\n\n\tif rule.BodyType != \"\" {\n\t\tmappedBodyType, ok := bodyTypeMatch[rule.BodyType]\n\t\tif !ok {\n\t\t\treturn \"\", fmt.Errorf(\"unknown body type '%s'\", rule.BodyType)\n\t\t}\n\n\t\tr.WriteString(fmt.Sprintf(\",ctl:requestBodyProcessor=%s\", mappedBodyType))\n\t}\n\n\tif opts.chain {\n\t\tr.WriteString(\",chain\")\n\t}\n","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/appsec/appsec_rule/modsecurity.go#L370-L406","documentation":"A string in rule.Transform is not a key of transformMap (the transform→modsecurity transform mapping, e.g. lowercase, urldecode). The custom rule asks for a transformation the converter cannot translate; the literal 'count' is filtered out earlier when hasCount is set.","triggerScenarios":"Thrown at pkg/appsec/appsec_rule/modsecurity.go:388 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or fix the transform entry to a documented one (lowercase, uppercase, urldecode, trim, ...)","Verify the transform list against the installed crowdsec version's supported set"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}