mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 10:22:44 +00:00
fix: sandbox browser docker no-sandbox rollout (#29879) (thanks @Lukavyi)
This commit is contained in:
@@ -158,6 +158,7 @@ describe("ensureSandboxBrowser create args", () => {
|
||||
expect(createArgs).toBeDefined();
|
||||
expect(createArgs).toContain("127.0.0.1::6080");
|
||||
const envEntries = envEntriesFromDockerArgs(createArgs ?? []);
|
||||
expect(envEntries).toContain("OPENCLAW_BROWSER_NO_SANDBOX=1");
|
||||
const passwordEntry = envEntries.find((entry) =>
|
||||
entry.startsWith("OPENCLAW_BROWSER_NOVNC_PASSWORD="),
|
||||
);
|
||||
|
||||
@@ -263,6 +263,10 @@ export async function ensureSandboxBrowser(params: {
|
||||
}
|
||||
args.push("-e", `OPENCLAW_BROWSER_VNC_PORT=${params.cfg.browser.vncPort}`);
|
||||
args.push("-e", `OPENCLAW_BROWSER_NOVNC_PORT=${params.cfg.browser.noVncPort}`);
|
||||
// Chromium's setuid/namespace sandbox cannot work inside Docker containers
|
||||
// (PID namespace creation requires privileges Docker does not grant by default).
|
||||
// The container itself provides isolation, so --no-sandbox is safe here.
|
||||
args.push("-e", "OPENCLAW_BROWSER_NO_SANDBOX=1");
|
||||
if (noVncEnabled && noVncPassword) {
|
||||
args.push("-e", `${NOVNC_PASSWORD_ENV_KEY}=${noVncPassword}`);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export const DEFAULT_TOOL_DENY = [
|
||||
|
||||
export const DEFAULT_SANDBOX_BROWSER_IMAGE = "openclaw-sandbox-browser:bookworm-slim";
|
||||
export const DEFAULT_SANDBOX_COMMON_IMAGE = "openclaw-sandbox-common:bookworm-slim";
|
||||
export const SANDBOX_BROWSER_SECURITY_HASH_EPOCH = "2026-02-21-novnc-auth-default";
|
||||
export const SANDBOX_BROWSER_SECURITY_HASH_EPOCH = "2026-02-28-no-sandbox-env";
|
||||
|
||||
export const DEFAULT_SANDBOX_BROWSER_PREFIX = "openclaw-sbx-browser-";
|
||||
export const DEFAULT_SANDBOX_BROWSER_NETWORK = "openclaw-sandbox-browser";
|
||||
|
||||
Reference in New Issue
Block a user