fix: CRITICAL — scope copilot tree query to current account #131
Reference in New Issue
Block a user
Delete Branch "fix/copilot-tree-access-bypass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
start_conversation()incopilot_service.pyloaded a tree by UUID with no account filter — an attacker knowing another account's tree UUID could extract its full node structure, names, and descriptions via the AI system promptaccount_id == current_account OR is_default OR is_public OR author_id == usertest_copilot_cannot_start_conversation_with_other_account_treeImpact
Any authenticated user with a known tree UUID from another account could start a copilot conversation and have that tree's content injected into the AI system prompt. Full cross-tenant data disclosure via the AI layer.
Test plan
test_copilot_cannot_start_conversation_with_other_account_treeconfirms Account A gets 404 on Account B's private treefeat/tenant-isolation-phase-0🤖 Generated with Claude Code
🚅 Deployed to the resolutionflow-pr-131 environment in selfless-grace