{"record":{"id":"a3a32142023ee223","repo":"projectdiscovery/nuclei","slug":"payload-concurrency-must-be-at-least-1","errorCode":null,"errorMessage":"payload concurrency must be at least 1","messagePattern":"payload concurrency must be at least 1","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/config.go","lineNumber":148,"sourceCode":"\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\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 {","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/lib/config.go#L130-L166","documentation":"After marker replacement, getActionArg renders the argument through render.Render with the page's variables. A DSL expression that fails to parse or evaluate - unknown helper, wrong arity, unbalanced braces - makes Render return an error, wrapped here with the argument name. It is effectively a template expression error surfaced at headless execution time.","triggerScenarios":"Action arguments using an undefined helper ({{base6(...)}} instead of {{base64(...)}}), a helper with the wrong argument count, or a reference to a variable never set earlier in the action chain.","commonSituations":"Authoring headless templates with DSL in args; nuclei upgrades renaming or removing helpers; copying expressions from HTTP sections into headless args.","solutions":["Run nuclei -validate -t template.yaml - it catches many expression errors","Check helper names and arity against nuclei's DSL function list","Make sure every variable used in the argument is defined earlier in the template or action chain","Fix quoting so the expression survives YAML parsing intact"],"exampleFix":"# before\nvalue: \"{{base6(payload)}}\"\n# after\nvalue: \"{{base64(payload)}}\"","handlingStrategy":"validation","validationCode":"import \"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/expressions\"\n\nfunc expressionOK(expr string, values map[string]interface{}) error {\n    if err := expressions.ContainsUnresolvedVariables(expr); err != nil {\n        return err\n    }\n    _, err := expressions.Evaluate(expr, values)\n    return err\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin and review the DSL helpers used per template","Run nuclei -validate in CI for headless templates","Set variables before referencing them in later actions"],"tags":["headless","dsl","expression","template"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}