Skip to content

fix(tools): declare filesystem path arguments and canonicalize all paths - #21

Merged
1998x-stack merged 5 commits into
mainfrom
fix/phase4-tool-path-contracts
Oct 28, 2026
Merged

1998x-stack merged 5 commits into
mainfrom
fix/phase4-tool-path-contracts

Conversation

@1998x-stack

Copy link
Copy Markdown
Owner

Tool Factory path contract hardening.

  • Add ToolDef.path_args for explicit, schema-backed path declarations (including custom names such as filename or asset_path).
  • Canonicalize every declared or conventional filesystem path before executing a handler; fix old third-party fallback that only checked one field and discarded canonical paths.
  • Preserve legacy built-in and conventional-name behavior; migrate built-in file, search and shell definitions to explicit declarations.
  • Validate schema references in path_args at registration and re-validate approval-modified paths before execution.
  • Regression tests cover differing process CWD, multi-path escape attempts, symlink escapes, custom field names and modified approval arguments.

Not an OS sandbox; symlink race/TOCTOU and arbitrary shell filesystem access remain out of scope.

@1998x-stack
1998x-stack merged commit 9aa19ae into main Oct 28, 2026
3 checks passed
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