bito-code-review[bot] commented on code in PR #41753:
URL: https://github.com/apache/superset/pull/41753#discussion_r3538821387


##########
tests/unit_tests/mcp_service/test_guest_token_auth.py:
##########
@@ -333,6 +334,30 @@ def test_tool_denied_for_guest_helper(app: SupersetApp) -> 
None:
         assert _tool_denied_for_guest(allowed) is False
 
 
+def test_default_deny_list_matches_config() -> None:
+    """The auth.py default and the mcp_config.py default must stay in sync."""
+    from superset.mcp_service.mcp_config import MCP_GUEST_DENIED_TOOLS
+
+    assert set(_DEFAULT_GUEST_DENIED_TOOLS) == set(MCP_GUEST_DENIED_TOOLS)
+
+
[email protected](
+    "tool_name",
+    ["list_users", "get_user_info", "list_roles", "get_role_info"],

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Incomplete parametrized test coverage</b></div>
   <div id="fix">
   
   The parametrized test `test_directory_and_security_tools_denied_to_guest` 
covers only 4 of the 6 tools in `_DEFAULT_GUEST_DENIED_TOOLS` — `"find_users"` 
and `"get_instance_info"` are missing. While 
`test_tool_denied_for_guest_helper` already verifies `"find_users"`, 
`get_instance_info` has no dedicated entry in this parametrized suite. Adding 
them ensures the contract stays complete if the deny-list grows.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #56a546</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset/mcp_service/rls/tool/get_rls_filter_info.py:
##########
@@ -59,6 +59,16 @@ async def get_rls_filter_info(
     {"identifier": 1}
     ```
     """
+    from superset import security_manager

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Inline import violation</b></div>
   <div id="fix">
   
   BITO.md rule [12745] requires module-level imports; current inline placement 
at line 62 lacks documented circular dependency justification.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #56a546</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to