Proposed Changes

This PR addresses issue #6674 by replacing panic calls with proper error handling in the template loader.

Modifications:

  • pkg/catalog/loader/loader.go: Replaced panic with fmt.Errorf and updated LoadTemplatesWithTags, LoadTemplates, and Load to return errors.
  • pkg/protocols/common/automaticscan/util.go: Updated to handle errors from the template store.
  • internal/runner/lazy.go: Updated to handle errors during lazy template fetching.
  • pkg/catalog/loader/loader_bench_test.go: Fixed benchmark tests signatures.

Proof

Verified with:

  • go build ./...
  • go test ./pkg/catalog/loader/... (Result: PASS)

/claim #6674 download

Summary by CodeRabbit

  • Bug Fixes

    • More robust template loading with improved error propagation and removal of the strict one-template-per-path restriction.
  • Tests

    • Updated benchmark tests for template loading.
    • Added a unit test covering path-merging behavior for HTTP requests.
  • Refactor

    • Minor internal adjustments to reduce unexpected redeclaration issues and streamline call flows.

Claim

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

Contributors

AL

Alessandro Anello

@AleAnee

100%

Sponsors

PR

ProjectDiscovery

@projectdiscovery

$100
MA

Madhavan Deepak

@Madhavan-Deepak

$100