From d85bfdd24f9aade63fd4addb7aad08bcaa456c94 Mon Sep 17 00:00:00 2001 From: kina0630 Date: Sat, 30 May 2026 17:08:27 +0800 Subject: [PATCH] fix(shell): allow relative paths with slashes --- coding-agent/src/coding_agent/tools/shell.py | 2 +- coding-agent/tests/tools/test_shell.py | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/coding-agent/src/coding_agent/tools/shell.py b/coding-agent/src/coding_agent/tools/shell.py index 5a2505a4c..b112ef443 100644 --- a/coding-agent/src/coding_agent/tools/shell.py +++ b/coding-agent/src/coding_agent/tools/shell.py @@ -233,7 +233,7 @@ def _validated_execution_cwd( def _validate_no_path_escape(args: list[str], workspace_root: Path) -> None: for arg in args[1:]: - for match in re.findall(r"/[A-Za-z0-9_./-]+", arg): + for match in re.findall(r"(?