Closed C0de4you closed 1 month ago
-sf, -secret-file string[] path to config file containing secrets for nuclei authenticated scan nuclei -l openapi.json -im openapi -t templates -sresp -secret-file ["secrets.yaml","/to/path/your login.yaml"] -debug
Nuclei version:
Nuclei Engine Version: v3.3.0
Nuclei command:
secrets.yaml
login.yaml
templates/sqli.yaml
Current Behavior:
nuclei writes that it cannot find the file although it is obviously present.
Expected Behavior:
if we remove the fuzzing from the templates/sqli.yaml
It work
Steps To Reproduce:
I followed the error
[FTL] Could not fetch dynamic secret: no templates found for path: login.yaml
and I found that the function responsible for loading a template is the https://github.com/projectdiscovery/nuclei/blob/dev/pkg/catalog/loader/loader.go#L425When we pass nuclei dynamic templates the control flow goes to the condition
if store.config.ExecutorOptions.Options.DAST
https://github.com/projectdiscovery/nuclei/blob/dev/pkg/catalog/loader/loader.go#L474, but for login templates the following conditionif parsed.IsFuzzing()
is not executed and nothing happens. As a resultLoadTemplatesWithTags
returns an empty slice and checking the slice length in theGetLazyAuthFetchCallback
function https://github.com/projectdiscovery/nuclei/blob/dev/internal/runner/lazy.go#L66 returns the very error that no template was found