projectdiscovery/nuclei · error

no input provider found

Error message

no input provider found

What it means

ParseSMBTarget trims whitespace and rejects an empty input outright - the first guard in SMB path parsing. It usually means a blank line survived input processing and reached the SMB reader.

Solutions

  1. Strip blank lines from the target list before scanning
  2. Ensure any variable feeding the SMB path resolves to a non-empty value
  3. Quote and audit inputs when embedding nuclei

Example fix

# before: targets.txt ends with a blank line
# after
grep -v '^[[:space:]]*$' targets.txt > targets.clean.txt
Defensive patterns

Strategy: validation

Validate before calling

import "strings"

func nonBlankSMBInput(s string) bool {
    return strings.TrimSpace(s) != ""
}

Prevention

When it happens

Trigger: An empty or whitespace-only string passed as an SMB target, e.g. trailing blank lines in a -l target file or a template variable that expands to nothing.

Common situations: Target files with trailing newlines or spaces; templated inputs where the path variable is unset.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/3a19d571e9dc3d7f. Report an issue: GitHub.

Appendix: source

Thrown at internal/runner/runner.go:932

			r.logAvailableTemplate(template.Path)
		}
		for _, template := range store.Workflows() {
			r.logAvailableTemplate(template.Path)
		}
	}

	finalTemplates := []*templates.Template{}
	finalTemplates = append(finalTemplates, store.Templates()...)
	finalTemplates = append(finalTemplates, store.Workflows()...)

	if len(finalTemplates) == 0 {
		return nil, errors.New("no templates provided for scan")
	}

	// pass input provider to engine
	// TODO: this should be not necessary after r.hmapInputProvider is removed + refactored
	if r.inputProvider == nil {
		return nil, errors.New("no input provider found")
	}
	results := engine.ExecuteScanWithOpts(context.Background(), finalTemplates, r.inputProvider, r.options.DisableClustering)
	return results, nil
}

// displayExecutionInfo prints parser stats, version info, and scan counts.
func (r *Runner) displayExecutionInfo(store *loader.Store) {
	// Display parser stats for templates loaded into the store.
	stats.Display(templates.TemplateSyntaxWarningStats)
	stats.Display(templates.TemplateSyntaxErrorStats)
	stats.Display(templates.TemplateRuntimeWarningStats)

	tmplCount := len(store.Templates())
	workflowCount := len(store.Workflows())
	if r.options.Verbose || (tmplCount == 0 && workflowCount == 0) {
		// Excluded-template stats are noisy during normal scans, but useful in verbose mode
		// and when no runnable templates remain.
		for _, capability := range templates.AllCapabilities() {

View on GitHub (pinned to 265b3a3dec)