Replies: 2 comments
-
|
Hey @Rubby2001 , thanks for sharing , the thing is early version of nuclei actually shipped templates in that way , but the problem with that approach is
if you actually check the templates repo you will see that new templates are added / updated very frequently , many times in a day https://github.com/projectdiscovery/nuclei-templates , supporting just embedding will cause many issues with maintenance and shipping but we do have the auto download nuclei templates option , but i understand that this won't work in air gapped and offline only system, can you share more about your usecase ? and what your trying to achieve etc , either here or on discord, if this is a common workflow we will try to address this in some way Thank you |
Beta Was this translation helpful? Give feedback.
-
|
cc: @ehsandeep |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions