Escape agents search filters#403
Conversation
Greptile SummaryThis PR fixes PostgREST filter injection in the agent search by escaping raw
Confidence Score: 5/5Safe to merge — the escaping logic is correct, the chaining order avoids double-escaping, and tests now cover all previously-flagged edge cases. The two escape functions are implemented correctly: backslashes are handled first in escapePostgrestSearchValue, so the subsequent replacement in escapePostgrestArrayLiteralValue cannot double-escape them. No injection paths remain in the changed code, and the new tests confirm the expected output for each class of special character. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Cover agents search escape edge cases" | Re-trigger Greptile |
Fixes agent search filters that interpolate raw q and tag URL values into PostgREST .or(...) strings. Search terms now use the shared PostgREST search escaper, and tag filters escape array-literal syntax before being embedded in skills/ai_tools containment filters.
Validation: