mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 06:32:43 +00:00
fix: harden exec sandbox fallback semantics (#23398) (thanks @bmendonca3)
This commit is contained in:
@@ -33,7 +33,12 @@ test("exec disposes PTY listeners after normal exit", async () => {
|
||||
kill: vi.fn(),
|
||||
}));
|
||||
|
||||
const tool = createExecTool({ allowBackground: false });
|
||||
const tool = createExecTool({
|
||||
allowBackground: false,
|
||||
host: "gateway",
|
||||
security: "full",
|
||||
ask: "off",
|
||||
});
|
||||
const result = await tool.execute("toolcall", {
|
||||
command: "echo ok",
|
||||
pty: true,
|
||||
@@ -64,7 +69,12 @@ test("exec tears down PTY resources on timeout", async () => {
|
||||
kill,
|
||||
}));
|
||||
|
||||
const tool = createExecTool({ allowBackground: false });
|
||||
const tool = createExecTool({
|
||||
allowBackground: false,
|
||||
host: "gateway",
|
||||
security: "full",
|
||||
ask: "off",
|
||||
});
|
||||
await expect(
|
||||
tool.execute("toolcall", {
|
||||
command: "sleep 5",
|
||||
|
||||
Reference in New Issue
Block a user