Commit af0a603
fix(tools): allow paths within routed workspace in exec guard
The exec safety guard was blocking commands containing absolute paths
to routed workspaces (e.g., /home/ernie/Dropbox/sciclaw/project) when
the shared workspace was different (e.g., ~/sciclaw).
The guard only checked if paths were within:
1. The current working directory (cwd)
2. The shared workspace
But not the tool's configured workspace (t.workingDir), which is set
to the routed workspace for channel-specific routing.
This caused legitimate commands like:
cd /routed/workspace/subdir && git commit -m "message"
to be blocked with "path outside working dir".
Fix: Also add t.workingDir to allowedRoots when it differs from both
cwd and sharedWorkspace.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 4c333d1 commit af0a603
2 files changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
689 | 695 | | |
690 | 696 | | |
691 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
458 | 485 | | |
459 | 486 | | |
460 | 487 | | |
| |||
0 commit comments