Proposed changes

This PR addresses issue #6674 by replacing explicit panics with returned errors in the template loader.

  • Updated pkg/catalog/loader/loader.go to return a formatted error instead of crashing when dialers are nil.
  • Refactored syncutil.New to safely propagate errors back to the caller.
  • Ensured all dependent files like runner.go and nuclei_sdk.go handle these new error returns gracefully.

Proof

  • Added a regression test TestLoadTemplates_NoDialers in pkg/catalog/loader/loader_test.go to verify the fix.
  • This test confirms that the system returns an error instead of panicking when dialers are missing.
  • Verified that all 120+ existing unit tests pass locally.

Checklist

  • Pull request is created against the dev branch
  • All checks passed with my changes
  • I have added tests that prove my fix is effective
  • I have added necessary documentation

/claim #6674

Summary by CodeRabbit

  • Bug Fixes

    • Template loading failures now return clear errors and halt execution instead of being ignored.
  • Refactor

    • Broadened error handling around template-loading and execution paths; several load-related panic/ignore paths converted to explicit errors.
  • Tests

    • Added tests and updated benchmarks to assert and validate template-loading error behavior.

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted March 02, 2026
Last updated March 02, 2026

Contributors

MA

Madhavan Deepak

@Madhavan-Deepak

100%

Sponsors

PR

ProjectDiscovery

@projectdiscovery

$100
MA

Madhavan Deepak

@Madhavan-Deepak

$100