-
-
Notifications
You must be signed in to change notification settings - Fork 4
fix auth #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix auth #154
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -136,9 +136,11 @@ def __init__(self, protocol, endpoint, timeout): | |||||||||||||||||||||||||||||||||
| config["tool"], runs=config.get("runs", 10) | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||||||||
| logging.debug(f"Calling fuzz_all_tools with runs={config.get('runs', 10)}") | ||||||||||||||||||||||||||||||||||
| tool_results = await client.fuzz_all_tools( | ||||||||||||||||||||||||||||||||||
| runs_per_tool=config.get("runs", 10) | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
| logging.debug(f"fuzz_all_tools completed, got {len(tool_results)} tool results") | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+139
to
+143
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Ruff E501 by wrapping debug logs. These new f-strings exceed the line-length limit and fail CI. Use logger formatting and line wrapping. ✅ Proposed fix- logging.debug(f"Calling fuzz_all_tools with runs={config.get('runs', 10)}")
+ logging.debug(
+ "Calling fuzz_all_tools with runs=%s",
+ config.get("runs", 10),
+ )
@@
- logging.debug(f"fuzz_all_tools completed, got {len(tool_results)} tool results")
+ logging.debug(
+ "fuzz_all_tools completed, got %d tool results",
+ len(tool_results),
+ )📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: Lint[error] 139-139: Ruff check failed: E501 Line too long (95 > 88) in mcp_fuzzer/client/main.py:139. Command: 'ruff check mcp_fuzzer tests'. [error] 143-143: Ruff check failed: E501 Line too long (100 > 88) in mcp_fuzzer/client/main.py:143. Command: 'ruff check mcp_fuzzer tests'. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| elif mode == "protocol": | ||||||||||||||||||||||||||||||||||
| await _run_spec_guard_if_enabled(client, config, reporter) | ||||||||||||||||||||||||||||||||||
| if config.get("protocol_type"): | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -233,8 +233,12 @@ async def fuzz_all_tools( | |
| tool_timeout: float | None = None, | ||
| ) -> dict[str, dict[str, Any]]: | ||
| """Fuzz all tools from the server.""" | ||
| self._logger.debug(f"fuzz_all_tools called with runs_per_tool={runs_per_tool}, tool_timeout={tool_timeout}") | ||
| self._logger.info("Fetching tools from server...") | ||
| tools = await self._get_tools_from_server() | ||
| self._logger.debug(f"_get_tools_from_server returned {len(tools) if tools else 0} tools") | ||
| if not tools: | ||
| self._logger.warning("No tools available for fuzzing") | ||
|
Comment on lines
+236
to
+241
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Ruff E501 by wrapping debug logs and using logger formatting. Current f-strings exceed the 88-char limit and fail CI. Switching to logger formatting resolves lint and avoids eager formatting. ✅ Proposed fix- self._logger.debug(f"fuzz_all_tools called with runs_per_tool={runs_per_tool}, tool_timeout={tool_timeout}")
+ self._logger.debug(
+ "fuzz_all_tools called with runs_per_tool=%s, tool_timeout=%s",
+ runs_per_tool,
+ tool_timeout,
+ )
@@
- self._logger.debug(f"_get_tools_from_server returned {len(tools) if tools else 0} tools")
+ self._logger.debug(
+ "_get_tools_from_server returned %d tools",
+ len(tools) if tools else 0,
+ )🧰 Tools🪛 GitHub Actions: Lint[error] 236-236: Ruff check failed: E501 Line too long (116 > 88) in mcp_fuzzer/client/tool_client.py:236. Command: 'ruff check mcp_fuzzer tests'. [error] 239-239: Ruff check failed: E501 Line too long (97 > 88) in mcp_fuzzer/client/tool_client.py:239. Command: 'ruff check mcp_fuzzer tests'. 🤖 Prompt for AI Agents |
||
| return {} | ||
|
|
||
| all_results = {} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Add unit coverage for the new fallback selection paths.
The new default-selection logic is subtle (single provider vs. api_key vs. empty). Please add tests to lock behavior and prevent regressions in future refactors. Suggested cases: single provider returns its headers; multiple providers with api_key prefer api_key; multiple providers without api_key returns empty dict.
🤖 Prompt for AI Agents