Repository navigation
Workspaces phase 2h: what the third review of phase 2 found (#277) - #326
Merged
Merged
Conversation
A third review of 2a-2g (cb8a218..cea25e2) found these: - Google Drive, CV Tools, Google Calendar and Supabase Storage act with the installation's credentials, shared by every workspace: platform-only on save, and refused at run time outside the default workspace. - Alert webhooks (and their Test), trigger HTTP callbacks, remote MCP servers on both runtimes and model_base_url no longer reach private, loopback or link-local addresses for a workspace other than the default one (shared/utils/outbound.py; OUTBOUND_ALLOW_PRIVATE_NETWORK lifts it). - A2A through the proxy runs as the member: the proxy sets x-mate-a2a-user and the agent server makes it the A2A user, instead of ADK's A2A_USER_<contextId>, which let a client continue anyone's session. - A multi-parent sub-agent instance carries its project_id, so may_run_code no longer takes it for a hardcoded agent. - LangGraph events for a rating are found by session and agent. - Spend with sub-agents follows parent_agents within the agent's workspace. - A Slack user carried over from before 1.6 joins the agent's workspace. - A personal access token of a closed workspace is refused. - A test case links only a version of its workspace. - LangGraph's stdio MCP check is judged by the agent's project, as on ADK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A third security review of phase 2 (
cb8a218..cea25e2, 2a–2g together) found ten candidates. Checked against the code, nine needed a fix; this PR has them. None affects 1.6: each path was opened in phase 2.Fixes
google_drive,cv_tools,google_calendar,supabase_storageact with the installation's credentials (Google service account, one Supabase key and bucket), so a workspace admin could read the installation's Drive or another workspace's stored filesSERVER_CREDENTIAL_TOOLS, the tool's value is the defining part, so anothercalendar_idis a change); refused at run time outside the default workspace in the tool factory (both runtimes)test_tools_on_the_server_s_credentials_are_platform_onlymodel_base_urlcould target127.0.0.1:8001(the unauthenticated agent server), metadata, the databaseshared/utils/outbound.py: for a workspace other than the default one, a URL resolving to a private, loopback, link-local, reserved or multicast address is refused. Default workspace unchanged (local Ollama, MCP beside MATE).OUTBOUND_ALLOW_PRIVATE_NETWORK=truelifts ittest_outbound_requests_of_a_workspace_stay_off_the_server_s_networkA2A_USER_<contextId>, chosen by the client: another member'scontextIdcontinued their session, RBAC checked a made-up user, and every new id created a user and a membershipx-mate-a2a-userto the caller (and drops it from what clients send);CallerAsA2AUseron the agent server puts it inscope["user"], which ADK runs as. Admins and the MCP bridge keep ADK's idtest_the_proxy_s_caller_is_the_user_the_agent_runs_as,TestProxy.test_a2a_runs_as_the_member…,…for_an_admin_keeps…<agent>_<parent>) had noproject_id, somay_run_codetook it for a hardcoded agentproject_idtest_a_multi_parent_instance_runs_code_only_where_its_agent_maysession_idalone; a widget rating of another workspace's session put its exchange on this workspace's eval pageSessionStore.get_events(session_id, app_name)test_events_are_found_by_agent_without_userparent_agentsacross workspaces_agent_treestays in the agent's workspace (an agent with no project counts as the default one's)test_spend_with_sub_agents_keeps_to_the_agent_s_workspace_carry_over_rolessetshome_workspace_idto the agent's workspacetest_a_slack_user_from_before_1_6_joins_the_agent_s_workspace/v1and MCP_workspace_of_callerchecksworkspace_is_open, for a platform administrator's token tootest_a_token_of_a_closed_workspace_stops_workingversion_id_require_in_workspacetest_a_test_case_links_only_a_version_of_the_workspaceEach new test fails without its fix. Also fixed on the way: LangGraph's stdio MCP check now passes the agent's project to
may_run_code, as ADK's does since 2f.Not changed
agent_nameanswers 400. This was decided in 2f. The Work Room, standalone chat and widget all send it; only an outside client posting to/dashboard/api/feedbackwithout it is affected.Known limit
outbound_refusalresolves the host when it checks, not when the request goes out. A name whose address changes in between (DNS rebinding) is not caught.docs/dev/auth-and-access.mdsays so.Checks
shared/test/test_client_contract.pyunchanged: 12/12 OK.python scripts/gen_docs.py --checkOK. The reference is regenerated forOUTBOUND_ALLOW_PRIVATE_NETWORK, which is also in.env.exampleand the CLAUDE.md table.Docs
docs/dev/auth-and-access.md: server-credential tools, A2A identity, the new "Requests to the server's own network" section,outbound.pyincovers.docs/dev/a2a.md: who reaches/a2a/*and as whom. Its "admins only" was out of date since 2e.docs/dev/trigger-engine.md,docs/dev/langgraph-runtime.md.docs/user/agents.md,tools-and-mcp.md,alerts.md,triggers.md.documents/design/2.0-plan.md: the 2h item; eight PRs.gen_docs.py driftand still accurate:docs/user/sessions-and-traces.md,slack.md,usage-and-audit.md: what users see is unchanged.docs/dev/agent-runtime.md,alerts.md,architecture.md,code-executor.md,openai-api-and-mcp.md,openai-compatibility.md,template-format.md,tracing.md,writing-a-tool.md: none covers the lines changed.Phase 2 closes after a fourth review over 2a–2h finds no cross-workspace path.