Repository navigation
fix(appsec): don't double-count URL query args - #4808
bharathvemula wants to merge 1 commit into
Conversation
|
@bharathvemula: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
|
@bharathvemula: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
|
/kind bug |
|
/area appsec |
|
/kind bug |
|
/kind bug |
|
/kind fix |
Fixes #4311
processRequest() fed request.Args into the transaction with AddGetRequestArgument and then called ProcessURI, which extracts the same query arguments from the URI again — every query parameter was counted twice (e.g.
&ARGS_GET:foo @eq 1never matched a single?foo=x). The loop is now gated: only arguments ProcessURI will not add reach the transaction, so query args count once while args supplied outside the URI still reach the rules. Wholesale deletion was not possible: the test suite builds requests with Args outside the URI, and deleting the loop broke 10 test functions.Tested: new TestAppsecQueryArgsNotDoubleCounted (fails before, passes after);
go test ./pkg/acquisition/modules/appsec/...and./pkg/appsec/...pass;go vetclean;golangci-lint run ./pkg/acquisition/modules/appsec/...(v2.13.0) clean. Fullmake testnot run.Note: #4311 still carries needs/triage; the reporter verified commenting out the loop makes the count correct.
Testing above was run by an AI agent; no human has independently verified it yet.
Disclosure: this PR was prepared with AI assistance.