Skip to content

Commit 6ac1078

Browse files
committed
fix: set environment variables for LD_PRELOAD and SANDBOX_ALLOW_HOSTS_REGEXES in sandbox execution
1 parent 9029240 commit 6ac1078

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/common/utils/tool_code.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ def get_tool_mcp_config(self, code, params):
181181
self.user,
182182
],
183183
'cwd': self.sandbox_path,
184-
'env': {},
184+
'env': {
185+
'LD_PRELOAD': '/opt/maxkb-app/sandbox/sandbox.so',
186+
'SANDBOX_ALLOW_HOSTS_REGEXES': self.allow_hosts_regexes,
187+
},
185188
'transport': 'stdio',
186189
}
187190
else:

0 commit comments

Comments
 (0)