{"record":{"id":"af2ed94a335c9e6c","repo":"projectdiscovery/nuclei","slug":"probe-concurrency-must-be-at-least-1","errorCode":null,"errorMessage":"probe concurrency must be at least 1","messagePattern":"probe concurrency must be at least 1","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/config.go","lineNumber":151,"sourceCode":"\t\t\treturn errors.New(\"template threads must be at least 1\")\n\t\t}\n\t\tif opts.HostConcurrency <= 0 {\n\t\t\treturn errors.New(\"host concurrency must be at least 1\")\n\t\t}\n\t\tif opts.HeadlessHostConcurrency <= 0 {\n\t\t\treturn errors.New(\"headless host concurrency must be at least 1\")\n\t\t}\n\t\tif opts.HeadlessTemplateConcurrency <= 0 {\n\t\t\treturn errors.New(\"headless template threads must be at least 1\")\n\t\t}\n\t\tif opts.JavascriptTemplateConcurrency <= 0 {\n\t\t\treturn errors.New(\"js must be at least 1\")\n\t\t}\n\t\tif opts.TemplatePayloadConcurrency <= 0 {\n\t\t\treturn errors.New(\"payload concurrency must be at least 1\")\n\t\t}\n\t\tif opts.ProbeConcurrency <= 0 {\n\t\t\treturn errors.New(\"probe concurrency must be at least 1\")\n\t\t}\n\t\te.opts.TemplateThreads = opts.TemplateConcurrency\n\t\te.opts.BulkSize = opts.HostConcurrency\n\t\te.opts.HeadlessBulkSize = opts.HeadlessHostConcurrency\n\t\te.opts.HeadlessTemplateThreads = opts.HeadlessTemplateConcurrency\n\t\te.opts.JsConcurrency = opts.JavascriptTemplateConcurrency\n\t\te.opts.PayloadConcurrency = opts.TemplatePayloadConcurrency\n\t\te.opts.ProbeConcurrency = opts.ProbeConcurrency\n\t\treturn nil\n\t}\n}\n\n// WithResponseReadSize sets the maximum size of response to read in bytes.\n// A value of 0 means no limit. Recommended values: 1MB (1048576) to 10MB (10485760).\nfunc WithResponseReadSize(responseReadSize int) NucleiSDKOptions {\n\treturn func(e *NucleiEngine) error {\n\t\tif responseReadSize < 0 {\n\t\t\treturn errors.New(\"response read size must be non-negative\")","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/lib/config.go#L133-L169","documentation":"For raw HTTP requests nuclei bufio-reads the first line; any read error - an empty raw block, or a request line with no trailing newline so ReadString returns io.EOF - aborts with 'could not read request'. Annotation lines (@tls-SNI etc.) are skipped, but a real request line terminated by a newline must follow them.","triggerScenarios":"A raw: block that is empty, contains only @annotation lines then EOF, or a quoted single-line scalar like \"GET / HTTP/1.1\" whose string lacks a final newline.","commonSituations":"Truncated raw templates; YAML quoted scalars collapsing newlines; copy-paste dropping the last line break.","solutions":["Make the raw block start with a complete request line that ends with a newline","Use a literal block (raw: |) so line breaks survive YAML parsing","If only annotations exist, add at least a minimal request line (GET / HTTP/1.1)","Validate with nuclei -validate"],"exampleFix":"# before\nraw:\n  - \"GET /path HTTP/1.1\"\n# after\nraw:\n  - |\n    GET /path HTTP/1.1\n    Host: {{BaseURL}}","handlingStrategy":"validation","validationCode":"import \"strings\"\n\nfunc rawRequestReadable(data string) bool {\n    if !strings.Contains(data, \"\\n\") {\n        return false // no terminated first line\n    }\n    for _, line := range strings.Split(data, \"\\n\") {\n        if !strings.HasPrefix(line, \"@\") && strings.TrimSpace(line) != \"\" {\n            return true // a real request line exists\n        }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use raw: | literal blocks so newlines survive YAML","Ensure the request line ends with a newline","Validate templates before deploying them"],"tags":["http","raw-request","yaml","template"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}