Skip to content

fix(core): authorize external glob paths - #38714

Merged
rekram1-node merged 2 commits into
v2from
glob-permissions
Jul 24, 2026
Merged

rekram1-node merged 2 commits into
v2from
glob-permissions

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • resolve glob search directories through the shared LocationMutation policy
  • require external_directory approval for explicit external paths and lexical escapes
  • preserve ordinary in-location symlink behavior without external approval
  • keep the existing tool description, parameter schema, and model-facing contract unchanged

Testing

  • bun test test/tool-search.test.ts from packages/core (5 passed)

Local package typecheck was not run.

@rekram1-node

Copy link
Copy Markdown
Collaborator Author

Scope correction: I initially changed the tool and parameter descriptions, changed the path schema, and added non-directory validation. Those changes were unrelated to the permission fix and had not been discussed. Commit 64f9666 restores the exact existing descriptions and parameter schema and removes the unrelated validation. The PR now only wires glob path resolution into the shared LocationMutation permission policy and tests explicit external paths plus in-location external symlinks.

@rekram1-node
rekram1-node merged commit 423fad7 into v2 Jul 24, 2026
8 of 9 checks passed
@rekram1-node
rekram1-node deleted the glob-permissions branch July 24, 2026 18:24
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
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.

1 participant