Skip to content

[Bounty $7k] fix(storage): enforce row-level workspace scope on task state — database access#3443

Open
Karry2019web wants to merge 1 commit into
orchestration-agent:mainfrom
Karry2019web:fix/workspace-scope-3370
Open

[Bounty $7k] fix(storage): enforce row-level workspace scope on task state — database access#3443
Karry2019web wants to merge 1 commit into
orchestration-agent:mainfrom
Karry2019web:fix/workspace-scope-3370

Conversation

@Karry2019web
Copy link
Copy Markdown

Closes #3370

Summary

Enforces mandatory workspace scope on all task state access paths. The AgentRegistry and AgentExecutor now require a workspace_id for 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_id filter on list() and count(), and a _ws_index for fast workspace-level lookups. Every register() call requires a workspace_id (default: "default").
  • src/agent/executor.py — Added get_result_scoped() and list_results(workspace_id) to the executor. Each execute() 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

PYTHONDONTWRITEBYTECODE=1 uv run pytest tests/test_workspace_scope.py -v

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Bounty $7k ] [ Storage ] Enforce row-level workspace scope on task state — database access

1 participant