{"record":{"id":"a19c1606e6501fbb","repo":"crowdsecurity/crowdsec","slug":"appname-is-empty","errorCode":null,"errorMessage":"appname is empty","messagePattern":"appname is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go","lineNumber":178,"sourceCode":"\tif r.buf[r.position] == NIL_VALUE {\n\t\tr.Tag = \"\"\n\t\tr.position += 2\n\t\treturn nil\n\t}\n\n\tappname := []byte{}\n\tfor r.position < r.len {\n\t\tc := r.buf[r.position]\n\t\tif c == ' ' {\n\t\t\tr.position++\n\t\t\tbreak\n\t\t}\n\t\tappname = append(appname, c)\n\t\tr.position++\n\t}\n\n\tif len(appname) == 0 {\n\t\treturn errors.New(\"appname is empty\")\n\t}\n\n\tif len(appname) > 48 {\n\t\treturn errors.New(\"appname is too long\")\n\t}\n\n\tr.Tag = string(appname)\n\treturn nil\n}\n\nfunc (r *RFC5424) parseProcID() error {\n\tif r.buf[r.position] == NIL_VALUE {\n\t\tr.PID = \"\"\n\t\tr.position += 2\n\t\treturn nil\n\t}\n\n\tprocid := []byte{}","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go#L160-L196","documentation":"Returned by parseAppName when the APPNAME field of an RFC5424 message parsed to zero bytes: the byte(s) between the hostname separator and the next space yielded no characters, and the field was not the NIL value '-' which is handled earlier.","triggerScenarios":"Thrown at pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send '-' as APPNAME when the sender has no app name","Fix the sender to emit a non-empty APPNAME (PRINTUSASCII per RFC5424)","Validate outgoing messages with an RFC5424 linter before shipping"],"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"}