projectdiscovery/nuclei · error
no templates provided for scan
Error message
no templates provided for scan
What it means
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.
Source
Thrown at internal/server/nuclei_sdk.go:156
}
// proxifyRequest is a request for proxify
type proxifyRequest struct {
URL string `json:"url"`
Request struct {
Header map[string]string `json:"header"`
Body string `json:"body"`
Raw string `json:"raw"`
} `json:"request"`
}
func (n *nucleiExecutor) ExecuteScan(target PostRequestsHandlerRequest) error {
finalTemplates := []*templates.Template{}
finalTemplates = append(finalTemplates, n.store.Templates()...)
finalTemplates = append(finalTemplates, n.store.Workflows()...)
if len(finalTemplates) == 0 {
return errors.New("no templates provided for scan")
}
payload := proxifyRequest{
URL: target.URL,
Request: struct {
Header map[string]string `json:"header"`
Body string `json:"body"`
Raw string `json:"raw"`
}{
Raw: target.RawHTTP,
},
}
marshalledYaml, err := yaml.Marshal(payload)
if err != nil {
return fmt.Errorf("error marshalling yaml: %s", err)
}
View on GitHub (pinned to 265b3a3dec)
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
Example fix
# before C:\shares\report.pdf # after \\fileserver\shares\report.pdf
Defensive patterns
Strategy: type-guard
Type guard
import "strings"
func isSMBPath(s string) bool {
s = strings.TrimSpace(s)
return strings.HasPrefix(strings.ToLower(s), "smb://") ||
strings.HasPrefix(s, "\\\\") ||
strings.HasPrefix(s, "//")
} Prevention
- Normalize all SMB inputs to UNC or smb:// form
- Keep local and SMB target lists in separate files
When it happens
Trigger: 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.
Common situations: Mixing local paths and SMB targets in one list; assuming the parser auto-detects Windows drive paths.
Related errors
- headless host concurrency must be at least 1
- no templates provided for scan
- template threads must be at least 1
- headless template threads must be at least 1
- share path contains NUL
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/d93e1fb927f2c35b.
Report an issue: GitHub.