Proposed Changes

This PR removes a panic path in template loading when dialers are not initialized for the current execution ID.

  • In pkg/catalog/loader/loader.go, when protocolstate.GetDialersWithId(typesOpts.ExecutionId) returns nil, it now attempts a safe initialization via protocolstate.Init(typesOpts).
  • If initialization fails, the loader logs a warning and returns safely instead of panicking.
  • If dialers are still unavailable after init, the loader logs a warning and returns safely.

This keeps behavior stable for normal scanning flows while preventing hard crashes in non-scanning/partial-init paths.

Proof

Before

  • Loader could panic with:
    • panic("dialers with executionId ... not found")

After

  • Loader no longer panics on missing dialers.
  • It attempts init, then degrades gracefully with warning logs if dialers are still unavailable.

Local verification

  • Previously validated in local environment:
    • go test ./pkg/catalog/loader -count=1

Checklist

  • PR targets the correct base branch (dev)
  • Changes are scoped to the reported issue
  • Added proof of behavior change (before/after + test command)
  • Full repository checks
  • Additional tests/docs (not required for this minimal fix)

/claim #6674

Summary by CodeRabbit

  • Bug Fixes
    • Improved error handling for missing initialization states with automatic fallback initialization.
    • Replaced abrupt failures with graceful degradation and warning logs, enhancing application stability.

Claim

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

Contributors

59

591893871-qq-com

@591893871-qq-com

100%

Sponsors

PR

ProjectDiscovery

@projectdiscovery

$100
MA

Madhavan Deepak

@Madhavan-Deepak

$100