mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:01:22 +00:00
Exec: fail closed when sandbox host is unavailable
This commit is contained in:
committed by
Peter Steinberger
parent
5a0032de3e
commit
c76a47cce2
@@ -349,9 +349,13 @@ 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: options?.exec?.host ?? execConfig.host,
|
||||
host: resolvedExecHost,
|
||||
security: options?.exec?.security ?? execConfig.security,
|
||||
ask: options?.exec?.ask ?? execConfig.ask,
|
||||
node: options?.exec?.node ?? execConfig.node,
|
||||
|
||||
Reference in New Issue
Block a user