diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index 279c4ef56..d6298805e 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -181,7 +181,10 @@ exec({dedent(code)!a}) self.user, ], 'cwd': self.sandbox_path, - 'env': {}, + 'env': { + 'LD_PRELOAD': '/opt/maxkb-app/sandbox/sandbox.so', + 'SANDBOX_ALLOW_HOSTS_REGEXES': self.allow_hosts_regexes, + }, 'transport': 'stdio', } else: