Proposed Changes

This PR removes hard panics in template loader initialization paths and replaces them with graceful error handling:

  • LoadTemplatesWithTags no longer panics when waitgroup creation fails.
  • LoadTemplatesWithTags no longer panics when dialers for ExecutionId are missing.
  • In both cases, loader logs the error and returns safely instead of crashing the scan process.

Tests

Added regression test:

  • TestLoadTemplatesWithTags_NoDialers_NoPanic

Proof:

go test ./pkg/catalog/loader -run 'TestLoadTemplatesWithTags_NoDialers_NoPanic|TestLoadTemplates|TestRemoteTemplates' -count=1
ok github.com/projectdiscovery/nuclei/v3/pkg/catalog/loader 0.608s

Checklist

  • PR targets dev
  • Behavior change covered by test
  • No panic path now handled gracefully

/claim #6674

Summary by CodeRabbit

  • New Features

    • Introduced inline target list expansion for enhanced flexibility in target specification
  • Bug Fixes

    • Improved error handling in template loading and profile processing to gracefully handle failures instead of system crashes
    • Enhanced template profile sanitization before configuration merging

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted February 21, 2026
Last updated February 21, 2026

Contributors

TY

tyeungchukong-gmail-com

@tyeungchukong-gmail-com

100%

Sponsors

PR

ProjectDiscovery

@projectdiscovery

$100
MA

Madhavan Deepak

@Madhavan-Deepak

$100