{"record":{"id":"be87630c4e57a203","repo":"projectdiscovery/nuclei","slug":"host-concurrency-must-be-at-least-1","errorCode":null,"errorMessage":"host concurrency must be at least 1","messagePattern":"host concurrency must be at least 1","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/config.go","lineNumber":136,"sourceCode":"type Concurrency struct {\n\tTemplateConcurrency           int // number of templates to run concurrently (per host in host-spray mode)\n\tHostConcurrency               int // number of hosts to scan concurrently  (per template in template-spray mode)\n\tHeadlessHostConcurrency       int // number of hosts to scan concurrently for headless templates  (per template in template-spray mode)\n\tHeadlessTemplateConcurrency   int // number of templates to run concurrently for headless templates (per host in host-spray mode)\n\tJavascriptTemplateConcurrency int // number of templates to run concurrently for javascript templates (per host in host-spray mode)\n\tTemplatePayloadConcurrency    int // max concurrent payloads to run for a template (a good default is 25)\n\tProbeConcurrency              int // max concurrent http probes to run (a good default is 50)\n}\n\n// WithConcurrency sets concurrency options\nfunc WithConcurrency(opts Concurrency) NucleiSDKOptions {\n\treturn func(e *NucleiEngine) error {\n\t\t// minimum required is 1\n\t\tif opts.TemplateConcurrency <= 0 {\n\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","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/lib/config.go#L118-L154","documentation":"After net/url.Parse succeeds, an smb:// URL with an empty host is rejected: u.Host must be non-empty because the SMB bridge must dial a concrete server on port 445. This catches URLs where the host was omitted or the whole authority slid into the path.","triggerScenarios":"smb:///share/file.txt (three slashes) or smb:// - no host component to dial.","commonSituations":"Typos deleting the hostname; template variables for the host expanding to an empty string.","solutions":["Include the host: smb://server/share/file.txt","Check the string between // and the first / is not empty","Pre-validate generated URLs before scanning"],"exampleFix":"# before\nsmb:///share/file.txt\n# after\nsmb://fileserver/share/file.txt","handlingStrategy":"validation","validationCode":"import \"net/url\"\n\nfunc smbURLHasHost(raw string) bool {\n    u, err := url.Parse(raw)\n    if err != nil {\n        return false\n    }\n    return u.Host != \"\"\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never strip the hostname when templating smb:// URLs","Test expanded URLs with a parser before scanning"],"tags":["smb","url","validation"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}