Fix default sandbox image fallback for python3-dependent mutations#73362
Fix default sandbox image fallback for python3-dependent mutations#73362vincentkoc merged 1 commit intomainfrom
Conversation
Greptile SummaryThis PR removes the silent fallback in Confidence Score: 5/5Safe to merge — targeted, correct fix with appropriate regression coverage and no side effects on other code paths. The change is minimal and correct: it replaces a silent misbehavior (tagging plain Debian as the sandbox image) with a clear, actionable error. The test verifies the exact regression scenario, scripts/sandbox-setup.sh exists in the repo so the error message reference is valid, and no other callers are affected. No files require special attention. Reviews (1): Last reviewed commit: "Fix default sandbox image fallback for p..." | Re-trigger Greptile |
4c1f618 to
e9139d8
Compare
e9139d8 to
5210da1
Compare
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 Unhandled exception from ensureDockerImage can crash runs when default sandbox image is missing
Description
This becomes an availability/DoS risk because the error propagates to sandbox initialization and can terminate an embedded run:
Vulnerable code: if (image === DEFAULT_SANDBOX_IMAGE) {
throw new Error(
`Sandbox image not found: ${image}. Build it with scripts/sandbox-setup.sh before enabling Docker sandboxing. ...`,
);
}RecommendationHandle missing images gracefully at the sandbox-entry boundary so a missing Docker image does not crash the whole run. Options:
let sandbox: SandboxContext | null = null;
try {
sandbox = await resolveSandboxContext({ config, sessionKey, workspaceDir });
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
log.error(`Sandbox unavailable; continuing without sandbox: ${msg}`);
sandbox = null;
}
Also ensure any process supervisor does not infinitely restart on this configuration error (surface a clear, actionable message and fail fast only in CLI commands that explicitly require sandboxing). Analyzed PR: #73362 at commit Last updated on: 2026-04-28T09:00:52Z |
Summary
openclaw-sandbox:bookworm-slimby tagging plaindebian:bookworm-slimwithout the tooling required by sandbox mutation helpers.Dockerfile.sandboxand keep the change scoped to image resolution plus tests.Linked Issues
Fixes #51185.
Related duplicate reports: #45108, #51099, #51609, #57713.
Related diagnostic PR: #56785.
Credit
Thanks @dpalis for the canonical root-cause report in #51185. Thanks @Tin55FoilDev, @jbcohen2-coder, @macminihal-cyber, and @PraxoOnline for the duplicate reports and reproduction details. Credit @tonga54/#56785 only if the implementation reuses its guidance or test approach.
Validation
pnpm check:changedProjectClownfish replacement details: