[Bounty $7k] fix(storage): enforce row-level workspace scope on task state — database access#3443
Open
Karry2019web wants to merge 1 commit into
Open
Conversation
…ase access Closes orchestration-agent#3370 Adds mandatory workspace_id scoping to AgentRegistry and AgentExecutor: - `get_scoped()`, `update_status_scoped()`, `delete_scoped()` methods on registry - `workspace_id` filter on `list()` and `count()` - `get_result_scoped()` and `list_results(workspace_id)` on executor - Workspace isolation index to prevent cross-workspace data leaks - Comprehensive test coverage for workspace boundary enforcement
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.
Closes #3370
Summary
Enforces mandatory workspace scope on all task state access paths. The
AgentRegistryandAgentExecutornow require aworkspace_idfor read, write, and list operations, preventing cross-workspace data leaks.Changes
src/agent/registry.py— Added workspace-scoped methods (get_scoped,update_status_scoped,delete_scoped),workspace_idfilter onlist()andcount(), and a_ws_indexfor fast workspace-level lookups. Everyregister()call requires aworkspace_id(default:"default").src/agent/executor.py— Addedget_result_scoped()andlist_results(workspace_id)to the executor. Eachexecute()call tracks the result's workspace so cross-workspace access is blocked.tests/test_workspace_scope.py— 12 new deterministic tests covering workspace boundary enforcement, correct-scope access, wrong-scope rejection, and cross-workspace isolation.Verification