fix(security): harden sandbox novnc observer flow

This commit is contained in:
Agent
2026-03-01 22:44:15 +00:00
parent 4ab13eca4d
commit 002539c01e
10 changed files with 128 additions and 32 deletions

View File

@@ -162,7 +162,7 @@ describe("ensureSandboxBrowser create args", () => {
const passwordEntry = envEntries.find((entry) =>
entry.startsWith("OPENCLAW_BROWSER_NOVNC_PASSWORD="),
);
expect(passwordEntry).toMatch(/^OPENCLAW_BROWSER_NOVNC_PASSWORD=[a-f0-9]{8}$/);
expect(passwordEntry).toMatch(/^OPENCLAW_BROWSER_NOVNC_PASSWORD=[A-Za-z0-9]{8}$/);
expect(result?.noVncUrl).toMatch(/^http:\/\/127\.0\.0\.1:19000\/sandbox\/novnc\?token=/);
expect(result?.noVncUrl).not.toContain("password=");
});