From 42e884c19dd7de03937c20858d2ec0a68e357f7d Mon Sep 17 00:00:00 2001 From: PDTeamX <8293321+ehsandeep@users.noreply.github.com> Date: Wed, 20 Aug 2025 05:48:13 +0530 Subject: [PATCH] fix(fuzz): restore proper ErrRuleNotApplicable error handling Fixes fuzzing regression introduced in commit 6a6fa4d3 where fmt.Errorf was incorrectly used instead of fuzz.ErrRuleNotApplicable. The issue caused pre-condition filters (like 'method == GET') to fail because the error type detection was broken. This led to legitimate fuzzing targets being incorrectly marked as 'not applicable for fuzzing'. Changes: - Restore fuzz.ErrRuleNotApplicable() call in executeAllFuzzingRules() - Ensures proper error type checking with fuzz.IsErrRuleNotApplicable() - Fixes path-based SQL injection fuzzing and other fuzz templates Tested with: integration_tests/fuzz/fuzz-path-sqli.yaml --- pkg/protocols/http/request_fuzz.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/protocols/http/request_fuzz.go b/pkg/protocols/http/request_fuzz.go index 3a7e2cc74..bba887fad 100644 --- a/pkg/protocols/http/request_fuzz.go +++ b/pkg/protocols/http/request_fuzz.go @@ -168,7 +168,7 @@ func (request *Request) executeAllFuzzingRules(input *contextargs.Context, value } if !applicable { - return fmt.Errorf("no rule was applicable for this request: %v", input.MetaInput.Input) + return fuzz.ErrRuleNotApplicable(fmt.Sprintf("no rule was applicable for this request: %v", input.MetaInput.Input)) } return nil