fix(exec): keep implicit sandbox default and restore no-alert baseline

This commit is contained in:
Peter Steinberger
2026-02-23 02:17:43 +01:00
parent f6c2e99f5d
commit 45febecf2a
4 changed files with 29 additions and 8 deletions

View File

@@ -364,13 +364,9 @@ export function createOpenClawCodingTools(options?: {
return [tool];
});
const { cleanupMs: cleanupMsOverride, ...execDefaults } = options?.exec ?? {};
// Fail-closed baseline: when no sandbox context exists, default exec to gateway
// so we never silently treat "sandbox" as host execution.
const resolvedExecHost =
options?.exec?.host ?? execConfig.host ?? (sandbox ? "sandbox" : "gateway");
const execTool = createExecTool({
...execDefaults,
host: resolvedExecHost,
host: options?.exec?.host ?? execConfig.host,
security: options?.exec?.security ?? execConfig.security,
ask: options?.exec?.ask ?? execConfig.ask,
node: options?.exec?.node ?? execConfig.node,