Repository navigation
Commit 489d22c
fix(permission): resolve path rules under a wildcard permission too
The resolved pattern of an external_directory request only gave a resolved
spelling to rules whose permission is exactly external_directory, so a path
grant such as {"*": {"/tmp/link/*": "allow"}} prompted again for the real
directory although the path as written was allowed. Every rule that applies
to the request now gets one, and only patterns whose directory part is an
absolute path are resolved, so command patterns are left alone.
The agent-level symlink test creates a junction on Windows, and its name now
says it checks a direct read of the real path.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent e433449 commit 489d22c
3 files changed
Lines changed: 13 additions & 3 deletions
File tree
- packages/opencode
- src/permission
- test
- agent
- permission
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
632 | 636 | | |
633 | | - | |
| 637 | + | |
634 | 638 | | |
635 | 639 | | |
636 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
0 commit comments