mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend): address CodeQL false positive - use full URL in test assertion
Use the complete URL variable instead of a substring to avoid CodeQL's "Incomplete URL substring sanitization" alert in test code.
This commit is contained in:
@@ -521,7 +521,8 @@ def test_build_mcp_simulation_prompt_contains_tool_info():
|
||||
system_prompt, user_prompt = _build_mcp_simulation_prompt(input_data)
|
||||
|
||||
assert "get_weather" in system_prompt
|
||||
assert "mcp.example.com" in system_prompt
|
||||
# Verify the full server URL is included (not just a substring)
|
||||
assert input_data["server_url"] in system_prompt
|
||||
assert '"city"' in system_prompt # schema
|
||||
assert "London" in user_prompt # arguments
|
||||
|
||||
|
||||
Reference in New Issue
Block a user