{"record":{"id":"d93e1fb927f2c35b","repo":"projectdiscovery/nuclei","slug":"no-templates-provided-for-scan-d93e1f","errorCode":null,"errorMessage":"no templates provided for scan","messagePattern":"no templates provided for scan","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/nuclei_sdk.go","lineNumber":156,"sourceCode":"}\n\n// proxifyRequest is a request for proxify\ntype proxifyRequest struct {\n\tURL     string `json:\"url\"`\n\tRequest struct {\n\t\tHeader map[string]string `json:\"header\"`\n\t\tBody   string            `json:\"body\"`\n\t\tRaw    string            `json:\"raw\"`\n\t} `json:\"request\"`\n}\n\nfunc (n *nucleiExecutor) ExecuteScan(target PostRequestsHandlerRequest) error {\n\tfinalTemplates := []*templates.Template{}\n\tfinalTemplates = append(finalTemplates, n.store.Templates()...)\n\tfinalTemplates = append(finalTemplates, n.store.Workflows()...)\n\n\tif len(finalTemplates) == 0 {\n\t\treturn errors.New(\"no templates provided for scan\")\n\t}\n\n\tpayload := proxifyRequest{\n\t\tURL: target.URL,\n\t\tRequest: struct {\n\t\t\tHeader map[string]string `json:\"header\"`\n\t\t\tBody   string            `json:\"body\"`\n\t\t\tRaw    string            `json:\"raw\"`\n\t\t}{\n\t\t\tRaw: target.RawHTTP,\n\t\t},\n\t}\n\n\tmarshalledYaml, err := yaml.Marshal(payload)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error marshalling yaml: %s\", err)\n\t}\n","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/internal/server/nuclei_sdk.go#L138-L174","documentation":"ParseSMBTarget routes only two syntaxes to the SMB bridge: smb:// URLs and UNC paths starting with two backslashes or //. Anything else - drive letters, POSIX paths, file:// URLs - is rejected as 'not an SMB path' before any parsing happens.","triggerScenarios":"Passing C:\\file.txt, /mnt/share/file.txt, or file:///srv/x to the SMB reader; only the two supported prefixes enable the SMB code path.","commonSituations":"Mixing local paths and SMB targets in one list; assuming the parser auto-detects Windows drive paths.","solutions":["Use UNC form \\\\host\\share\\file or URL form smb://host/share/file","Keep local paths out of SMB-targeted input lists","Check the prefix before invoking SMB helpers when embedding nuclei"],"exampleFix":"# before\nC:\\shares\\report.pdf\n# after\n\\\\fileserver\\shares\\report.pdf","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"import \"strings\"\n\nfunc isSMBPath(s string) bool {\n    s = strings.TrimSpace(s)\n    return strings.HasPrefix(strings.ToLower(s), \"smb://\") ||\n        strings.HasPrefix(s, \"\\\\\\\\\") ||\n        strings.HasPrefix(s, \"//\")\n}","tryCatchPattern":null,"preventionTips":["Normalize all SMB inputs to UNC or smb:// form","Keep local and SMB target lists in separate files"],"tags":["smb","path","parsing"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}