Harden workspace-scoped route access#668
Conversation
|
Reviewer note: This replaces oversized PR #667. This PR is intentionally scoped to one clean cherry-picked commit:
Security focus:
Validation caveat: |
Review (community / read-only) — Verdict: NEEDS-CHANGES
|
| Severity | Count |
|---|---|
| HIGH | 2 |
| MEDIUM | 2 |
| LOW | 2 |
Fix the agent_id null bypass and add the CHANGELOG/migration note for the workspace_id ?? 1 removal, then this is mergeable. Good work overall — the failure was the fail-open default in one branch of one check, not the architecture.
(Reviewer is read-only on this repo — flagging for a maintainer.)
Hardens workspace-scoped API route access by removing silent workspace fallback, enforcing fail-closed workspace context, restricting agent-scoped API keys to their own heartbeat/memory and assigned task surfaces, and adding focused regression coverage for workspace-scope and same-workspace overreach cases.
Scope:
Security changes:
Validation note:
This branch is clean and isolated, but full repo validation currently fails on builderz-labs/main before this patch. The same failures are present on untouched upstream main and are unrelated to this PR.
Pre-existing upstream validation failures:
Patch-specific finding: