diff --git a/pkg/templates/workflows.go b/pkg/templates/workflows.go index 94e2c11c..77e955c1 100644 --- a/pkg/templates/workflows.go +++ b/pkg/templates/workflows.go @@ -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) }