mirror of https://github.com/daffainfo/nuclei.git
validate code template in workflows (#4822)
* validate code template in workflows * fix missing executerdev
parent
4c7a0f424e
commit
e86f382997
|
@ -80,6 +80,16 @@ func parseWorkflowTemplate(workflow *workflows.WorkflowTemplate, preprocessor Pr
|
|||
gologger.Warning().Msgf("Could not parse workflow template %s: no executer found\n", path)
|
||||
continue
|
||||
}
|
||||
if len(template.RequestsCode) > 0 {
|
||||
if !options.Options.EnableCodeTemplates {
|
||||
gologger.Warning().Msgf("`-code` flag not found, skipping code template from workflow: %v\n", path)
|
||||
continue
|
||||
} else if !template.Verified {
|
||||
// unverfied code templates are not allowed in workflows
|
||||
gologger.Warning().Msgf("skipping unverified code template from workflow: %v\n", path)
|
||||
continue
|
||||
}
|
||||
}
|
||||
workflowTemplates = append(workflowTemplates, template)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue