{"record":{"id":"9ff6e75c5ecb8144","repo":"crowdsecurity/crowdsec","slug":"procid-is-empty","errorCode":null,"errorMessage":"procid is empty","messagePattern":"procid is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go","lineNumber":208,"sourceCode":"\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{}\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\tprocid = append(procid, c)\n\t\tr.position++\n\t}\n\n\tif len(procid) == 0 {\n\t\treturn errors.New(\"procid is empty\")\n\t}\n\n\tif len(procid) > 128 {\n\t\treturn errors.New(\"procid is too long\")\n\t}\n\n\tr.PID = string(procid)\n\treturn nil\n}\n\nfunc (r *RFC5424) parseMsgID() error {\n\tif r.buf[r.position] == NIL_VALUE {\n\t\tr.MsgID = \"\"\n\t\tr.position += 2\n\t\treturn nil\n\t}\n\n\tmsgid := []byte{}","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go#L190-L226","documentation":"parseProcID scans the PROCID field of an RFC5424 message up to the next space; if the buffer ends (or a space follows immediately without NILVALUE '-') before any character is collected, the mandatory PROCID is missing and the message is invalid per RFC 5424.","triggerScenarios":"Thrown at pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send '-' as PROCID when the sender has no process ID","Fix the sender to emit a non-empty PROCID or the NIL value"],"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"}