mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-02-05 02:03:11 +08:00
Prev, the template exclusion logic checked if the full file path contained any of the known miscellaneous directory names (e.g., helpers, .git). This caused false positives when valid templates were stored in paths where a parent directory matched one of these names (e.g., /path/to/somewhere/that/has/helpers/dir/name/). This commit introduces `IsTemplateWithRoot`, which checks for excluded directories relative to a provided root directory. It splits the relative path into components. Signed-off-by: Dwi Siswanto <git@dw1.io>