make sure people know people know this is dangerous

This commit is contained in:
2026-02-28 17:24:35 +08:00
parent c8847b0dbb
commit c4fdfd23c4

View File

@@ -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"})
# env={"PATH": "/usr/bin:/bin"}
inherit_env=True)