From 0787ff29e0e1380e89fa73ba298b5f12a9afa028 Mon Sep 17 00:00:00 2001 From: alban-stourbe-wmx <159776828+alban-stourbe-wmx@users.noreply.github.com> Date: Sat, 3 Aug 2024 19:43:31 +0200 Subject: [PATCH] Add Workflows SDK scan (#5409) * Add Workflows SDK scan * minor --------- Co-authored-by: Mzack9999 --- lib/sdk.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sdk.go b/lib/sdk.go index 60f5255bc..04b084f24 100644 --- a/lib/sdk.go +++ b/lib/sdk.go @@ -243,7 +243,12 @@ func (e *NucleiEngine) ExecuteCallbackWithCtx(ctx context.Context, callback ...f } e.resultCallbacks = append(e.resultCallbacks, filtered...) - _ = e.engine.ExecuteScanWithOpts(ctx, e.store.Templates(), e.inputProvider, false) + templatesAndWorkflows := append(e.store.Templates(), e.store.Workflows()...) + if len(templatesAndWorkflows) == 0 { + return ErrNoTemplatesAvailable + } + + _ = e.engine.ExecuteScanWithOpts(ctx, templatesAndWorkflows, e.inputProvider, false) defer e.engine.WorkPool().Wait() return nil }