-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Describe your feature request
I'd like to propose a feature that could enhance its usability for applications distributing pre-packaged templates: native support for embedded templates/workflows using Go's embed package.
Currently, when integrating Nuclei into a custom application, if we want to bundle templates directly (via //go:embed ), we have to manually extract them to a temporary filesystem first, then pass the temporary paths to TemplateSources . This adds unnecessary complexity and potential overhead, especially for tools that ship with a fixed set of templates.
It would be great if the TemplateSources struct could be extended to accept embed.FS directly, like:
type TemplateSources struct {
// Existing fields...
EmbeddedTemplates embed.FS // Embed FS containing templates
EmbeddedWorkflows embed.FS // Embed FS containing workflows
}
This way, users could embed templates at compile time and pass them directly to Nuclei without intermediate file I/O.
This feature would simplify distribution of Nuclei-based tools, reduce runtime dependencies on external template files, and make it easier to ship self-contained scanners.
Describe the use case of the feature
A common use case is building lightweight, self-contained security tools that bundle essential Nuclei templates directly into the binary via //go:embed . This eliminates the need for end-users to manage separate template files or fetch them at runtime—critical for offline environments, air-gapped systems, or tools where a fixed, audited set of templates is required to ensure consistency.
Describe alternatives you've considered
No response
Additional context
No response