mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 19:35:27 +00:00
fix(templates): suppress warn code flag not found
on validate. fixes #6498 Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
parent
8ea5061f5e
commit
95a72cfd50
@ -94,7 +94,14 @@ func parseWorkflowTemplate(workflow *workflows.WorkflowTemplate, preprocessor Pr
|
|||||||
|
|
||||||
if len(template.RequestsCode) > 0 {
|
if len(template.RequestsCode) > 0 {
|
||||||
if !options.Options.EnableCodeTemplates {
|
if !options.Options.EnableCodeTemplates {
|
||||||
gologger.Warning().Msgf("`-code` flag not found, skipping code template from workflow: %v\n", path)
|
// NOTE(dwisiswant0): It is safe to continue here during
|
||||||
|
// validation mode, because the template has already been parsed
|
||||||
|
// and syntax-validated by templates.Parse() above. It only
|
||||||
|
// prevents adding to workflow's executer list and suppresses
|
||||||
|
// warning messages.
|
||||||
|
if !options.Options.Validate {
|
||||||
|
gologger.Warning().Msgf("`-code` flag not found, skipping code template from workflow: %v\n", path)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
} else if !template.Verified {
|
} else if !template.Verified {
|
||||||
// unverfied code templates are not allowed in workflows
|
// unverfied code templates are not allowed in workflows
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user