From c4fdfd23c4680be879b8890a106ca4650b4f22b8 Mon Sep 17 00:00:00 2001 From: goulustis Date: Sat, 28 Feb 2026 17:24:35 +0800 Subject: [PATCH] make sure people know people know this is dangerous --- lang_agent/fs_bkends/localshell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang_agent/fs_bkends/localshell.py b/lang_agent/fs_bkends/localshell.py index f796a86..ba634e8 100644 --- a/lang_agent/fs_bkends/localshell.py +++ b/lang_agent/fs_bkends/localshell.py @@ -30,10 +30,12 @@ class LocalShellConfig(InstantiateConfig): class LocalShell(BaseFilesystemBackend): def __init__(self, config:LocalShellConfig): + logger.warning("Caution: The LocalShell backend grants direct access to the local system shell. Improper use can pose significant security and safety risks, including unintended code execution and file access. Use this backend with extreme care.") self.config = config self._build_backend() def _build_backend(self): self.backend = LocalShellBackend(root_dir=self.config.workspace_dir, virtual_mode=True, - env={"PATH": "/usr/bin:/bin"}) \ No newline at end of file + # env={"PATH": "/usr/bin:/bin"} + inherit_env=True) \ No newline at end of file