Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
fix(web_search): send only the agent's query to Exa search
Ahmed Allam84f4108195fb
diff --git a/strix/tools/web_search/tool.py b/strix/tools/web_search/tool.pyindex 9f1c4910..f525b1ea 100644--- a/strix/tools/web_search/tool.py+++ b/strix/tools/web_search/tool.py@@ -121,7 +121,7 @@ def _exa_content(api_key: str, query: str, search_type: str, num_results: int) -api_key,"https://api.exa.ai/search",{- "query": f"{_SYSTEM_PROMPT}\n\n{query}",+ "query": query,"type": search_type,"numResults": num_results,"contents": {"summary": {"query": _EXA_SUMMARY_PROMPT}},diff --git a/tests/test_web_search.py b/tests/test_web_search.pyindex 7ec066b9..6aff26ba 100644--- a/tests/test_web_search.py+++ b/tests/test_web_search.py@@ -110,7 +110,7 @@ def test_exa_content_requests_summaries_and_renders_results(assert captured["url"] == "https://api.exa.ai/search"assert captured["headers"]["x-api-key"] == "ek"- assert "OpenSSH 7.4 RCE?" in captured["json"]["query"]+ assert captured["json"]["query"] == "OpenSSH 7.4 RCE?"assert captured["json"]["type"] == "auto"assert captured["json"]["numResults"] == 5assert captured["json"]["contents"] == {"summary": {"query": tool._EXA_SUMMARY_PROMPT}}