nuclei icon indicating copy to clipboard operation
nuclei copied to clipboard

Manage nuclei-templates with version control system (with git or something similar)

Open dogancanbakir opened this issue 4 months ago • 2 comments

Discussed in https://github.com/orgs/projectdiscovery/discussions/6466

Originally posted by dogancanbakir September 10, 2025 See the initial discussion: https://github.com/projectdiscovery/nuclei/issues/4690

Notes from internal discussion @Mzack9999 and I:

During template updates, instead of rename, we create a new template, leaving outdated ones behind The default nuclei-templates folder should be like a git repository, this way renames and deletions would be tracked correctly. Actually I guess we only unzip directly Somehow we need to identify with template history, which ones are dupes based on content similarity and implement an auto-fix mechanism like to delete them if they were not altered and have only been renamed elsewhere, but I guess it's not super trivial and might take some time. We can mirror nuclei-templates since GH rate limit can cause issues.

dogancanbakir avatar Sep 10 '25 13:09 dogancanbakir

I ran a scan on my local nuclei-templates repository and found some duplicate templates.

Image

Shubhankargupta691 avatar Sep 13 '25 23:09 Shubhankargupta691

After review, probably the easiest option would be just to wipe the folder and unzip the new template pack. In this way all outdated templates and paths would be removed. The path is supposed not to be modified by the user anyway. Eventually we can make it read-only, and only during the update mark it writeable to allow updates. Another issue we need to resolve, is handling the update process with an empty folder that actually fails.

Mzack9999 avatar Nov 01 '25 16:11 Mzack9999