惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(browser): redact chrome bridge diagnostics · openclaw...
vincentkoc · 2026-05-17 · via Recent Commits to openclaw:main

File tree

  • extensions/browser/src/browser

Original file line numberDiff line numberDiff line change

@@ -80,6 +80,7 @@ Docs: https://docs.openclaw.ai

8080

- Providers/xAI: replace the retired `grok-imagine-image-pro` image model with `grok-imagine-image-quality` in the bundled image-generation provider and docs. (#81399) Thanks @KateWilkins.

8181

- Providers/OAuth: let browser-hosted identity provider pages read successful localhost callback responses, preventing xAI Grok OAuth from showing a false connection failure after OpenClaw completes login.

8282

- Gateway/security: reject malformed HTTP and WebSocket request targets with the existing auth failure response instead of letting invalid URL parsing crash the Gateway. Fixes GHSA-6hc3-f4rg-377m.

83+

- Browser/CDP: redact credential-bearing Chrome MCP and managed Chrome launch diagnostics, and require exact loopback entries before treating `NO_PROXY` as already covering local CDP proxy bypasses.

8384

- Gateway/diagnostics: redact credential-bearing gateway target URLs and client diagnostics while preserving raw connection URLs for programmatic use, so connect-failure logs no longer surface embedded tokens.

8485

- Gateway/auth: honor `OPENCLAW_GATEWAY_TOKEN` as the remote interactive fallback when no remote token is configured, keeping remote TUI setup aligned with documented auth precedence.

8586

- Providers/xAI: continue polling video generations while xAI reports in-flight jobs as `pending`, so Grok video requests no longer fail before the final `done` response. (#82610) Thanks @Manzojunior.

Original file line numberDiff line numberDiff line change

@@ -308,6 +308,29 @@ describe("withNoProxyForLocalhost preserves user-configured NO_PROXY", () => {

308308

delete process.env.no_proxy;

309309

}

310310

});

311+
312+

it("does not treat substring matches as complete loopback coverage", async () => {

313+

const userNoProxy = "notlocalhost,127.0.0.10,[::1].example";

314+

process.env.NO_PROXY = userNoProxy;

315+

process.env.no_proxy = userNoProxy;

316+

process.env.HTTP_PROXY = "http://proxy:8080";

317+
318+

try {

319+

const { withNoProxyForLocalhost } = await import("./cdp-proxy-bypass.js");

320+
321+

await withNoProxyForLocalhost(async () => {

322+

expect(process.env.NO_PROXY).toBe(`${userNoProxy},localhost,127.0.0.1,[::1]`);

323+

expect(process.env.no_proxy).toBe(`${userNoProxy},localhost,127.0.0.1,[::1]`);

324+

});

325+
326+

expect(process.env.NO_PROXY).toBe(userNoProxy);

327+

expect(process.env.no_proxy).toBe(userNoProxy);

328+

} finally {

329+

delete process.env.HTTP_PROXY;

330+

delete process.env.NO_PROXY;

331+

delete process.env.no_proxy;

332+

}

333+

});

311334

});

312335
313336

describe("withNoProxyForCdpUrl", () => {

Original file line numberDiff line numberDiff line change

@@ -47,9 +47,13 @@ const LOOPBACK_ENTRIES = "localhost,127.0.0.1,[::1]";

4747
4848

function noProxyAlreadyCoversLocalhost(): boolean {

4949

const current = process.env.NO_PROXY || process.env.no_proxy || "";

50-

return (

51-

current.includes("localhost") && current.includes("127.0.0.1") && current.includes("[::1]")

50+

const entries = new Set(

51+

current

52+

.split(",")

53+

.map((entry) => entry.trim().toLowerCase())

54+

.filter(Boolean),

5255

);

56+

return entries.has("localhost") && entries.has("127.0.0.1") && entries.has("[::1]");

5357

}

5458
5559

export async function withNoProxyForLocalhost<T>(fn: () => Promise<T>): Promise<T> {

Original file line numberDiff line numberDiff line change

@@ -230,6 +230,30 @@ describe("chrome MCP page parsing", () => {

230230

]);

231231

});

232232
233+

it("redacts remote CDP URL secrets from attach failures", async () => {

234+

const secretToken = "browserless-secret-token-1234567890"; // pragma: allowlist secret

235+

const cdpUrl = `wss://browserless.example/chrome?token=${secretToken}`;

236+
237+

let message = "";

238+

try {

239+

await ensureChromeMcpAvailable(

240+

"remote-profile",

241+

{

242+

cdpUrl,

243+

mcpCommand: process.execPath,

244+

mcpArgs: ["-e", "process.exit(1)"],

245+

},

246+

{ ephemeral: true },

247+

);

248+

} catch (err) {

249+

message = err instanceof Error ? err.message : String(err);

250+

}

251+
252+

expect(message).toContain("Chrome MCP existing-session attach failed");

253+

expect(message).toContain("browserless.example");

254+

expect(message).not.toContain(secretToken);

255+

});

256+
233257

it("parses new_page text responses and returns the created tab", async () => {

234258

const factory: ChromeMcpSessionFactory = async () => createFakeSession();

235259

setChromeMcpSessionFactoryForTest(factory);

Original file line numberDiff line numberDiff line change

@@ -8,8 +8,10 @@ import {

88

readStringValue,

99

} from "openclaw/plugin-sdk/string-coerce-runtime";

1010

import { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";

11+

import { redactSensitiveText } from "../logging/redact.js";

1112

import { createSubsystemLogger } from "../logging/subsystem.js";

1213

import { asRecord } from "../record-shared.js";

14+

import { redactCdpUrl } from "./cdp.helpers.js";

1315

import type { ChromeMcpSnapshotNode } from "./chrome-mcp.snapshot.js";

1416

import type { BrowserTab } from "./client.types.js";

1517

import { BrowserProfileUnavailableError, BrowserTabNotFoundError } from "./errors.js";

@@ -432,11 +434,11 @@ async function createRealSession(

432434

const stderr = getStderr();

433435

if (stderr) {

434436

log.warn(

435-

`Chrome MCP attach failed for profile "${profileName}". Subprocess stderr:\n${stderr}`,

437+

`Chrome MCP attach failed for profile "${profileName}". Subprocess stderr:\n${redactSensitiveText(stderr)}`,

436438

);

437439

}

438440

const targetLabel = options.browserUrl

439-

? `the configured Chrome endpoint (${options.browserUrl})`

441+

? `the configured Chrome endpoint (${redactCdpUrl(options.browserUrl) ?? options.browserUrl})`

440442

: options.userDataDir

441443

? `the configured Chromium user data dir (${options.userDataDir})`

442444

: "Google Chrome's default profile";

Original file line numberDiff line numberDiff line change

@@ -1027,10 +1027,11 @@ describe("chrome.ts internal", () => {

10271027

return false;

10281028

});

10291029

const fakeProc = makeFakeProc();

1030+

const secretToken = "chrome-stderr-secret-1234567890"; // pragma: allowlist secret

10301031

spawnMock.mockImplementation(() => {

10311032

// Synthesize stderr data shortly after spawn.

10321033

void Promise.resolve().then(() =>

1033-

fakeProc.stderr.emit("data", Buffer.from("chrome crash log\n")),

1034+

fakeProc.stderr.emit("data", Buffer.from(`chrome crash log token=${secretToken}\n`)),

10341035

);

10351036

return fakeProc;

10361037

});

@@ -1048,7 +1049,15 @@ describe("chrome.ts internal", () => {

10481049

noSandbox: true,

10491050

extraArgs: [],

10501051

} as unknown as ResolvedBrowserConfig;

1051-

await expect(launchOpenClawChrome(resolved, profile)).rejects.toThrow(/Chrome stderr:/);

1052+

let message = "";

1053+

try {

1054+

await launchOpenClawChrome(resolved, profile);

1055+

} catch (err) {

1056+

message = err instanceof Error ? err.message : String(err);

1057+

}

1058+

expect(message).toContain("Chrome stderr:");

1059+

expect(message).toContain("chrome crash log");

1060+

expect(message).not.toContain(secretToken);

10521061

});

10531062
10541063

it("omits the sandbox hint on non-linux platforms", async () => {

Original file line numberDiff line numberDiff line change

@@ -7,6 +7,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti

77

import type { SsrFPolicy } from "../infra/net/ssrf.js";

88

import { ensurePortAvailable } from "../infra/ports.js";

99

import { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";

10+

import { redactSensitiveText } from "../logging/redact.js";

1011

import { createSubsystemLogger } from "../logging/subsystem.js";

1112

import { CONFIG_DIR } from "../utils.js";

1213

import { hasChromeProxyControlArg, omitChromeProxyEnv } from "./browser-proxy-mode.js";

@@ -541,8 +542,9 @@ export async function launchOpenClawChrome(

541542

const diagnosticText = await diagnoseChromeCdp(profile.cdpUrl)

542543

.then(formatChromeCdpDiagnostic)

543544

.catch((err) => `CDP diagnostic failed: ${safeChromeCdpErrorMessage(err)}.`);

544-

const stderrOutput =

545-

normalizeOptionalString(Buffer.concat(stderrChunks).toString("utf8")) ?? "";

545+

const stderrOutput = redactSensitiveText(

546+

normalizeOptionalString(Buffer.concat(stderrChunks).toString("utf8")) ?? "",

547+

);

546548

if (

547549

allowSingletonRecovery &&

548550

CHROME_SINGLETON_IN_USE_PATTERN.test(stderrOutput) &&