Skip to content

fix(browser): enforce strict redirect policy for Chrome MCP navigation - #191271

Merged
pgondhi987 merged 2 commits into
openclaw:mainfrom
pgondhi987:fix/fix-1156
Nov 3, 2026
Merged

pgondhi987 merged 2 commits into
openclaw:mainfrom
pgondhi987:fix/fix-1156

Conversation

@pgondhi987

@pgondhi987 pgondhi987 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: strict browser SSRF policy cannot inspect redirect hops when navigation or a new tab uses an existing-session Chrome MCP profile.

User Impact

When browser.ssrfPolicy.dangerouslyAllowPrivateNetwork is explicitly false, existing-session profiles now reject HTTP(S) navigation and tab opens before sending a Chrome MCP command. Use a profile with driver openclaw for strict navigation. about:blank remains available, and other policy modes retain their existing behavior.

Why This Change Was Made

Reuse the browser navigation policy owner for a shared Chrome MCP preflight at both entry points. This applies the existing requirement for redirect inspection to a transport that cannot provide it. The added guard is needed at these two dispatch boundaries; no new configuration or state is introduced.

Evidence

Validated head: d3a9b11d11d21a6b51b7e4004c0e9a781f8452bd.

The five focused browser suites passed 180 tests. Both added regressions failed against base production code and passed with this fix. Focused lint, formatting, extension-wide typecheck, and git diff --check passed.

pnpm test extensions/browser/src/browser/server-context.existing-session.test.ts extensions/browser/src/browser/server.agent-contract-core.test.ts extensions/browser/src/browser/routes/agent.existing-session.test.ts extensions/browser/src/browser/routes/agent.snapshot.local-managed.test.ts extensions/browser/src/browser/routes/tabs.test.ts

Real Behavior Proof

Executed the authenticated production browser bridge HTTP routes with a real isolated Chromium 148 session and the packaged chrome-devtools-mcp 1.12.0 subprocess on Linux/Node 24.20.0. No browser, MCP, DNS, HTTP, or policy adapter was mocked. A transparent stdio recorder forwarded the actual messages unchanged and counted only MCP tool names. Two local HTTP servers counted redirect and protected-destination requests.

The fixture's loopback host was explicitly listed in allowedHostnames, so destination checks allowed the controlled target while strict redirect inspection remained required. This prevents an unrelated private-address rejection from satisfying the test. The exact same redirect URL was then exercised with private-network permission explicitly enabled as the positive control.

Scenario HTTP result Navigation/tab MCP dispatch Redirect requests Protected requests
Strict POST /navigate 400, redirect-inspection error 0 0 0
Strict POST /tabs/open 400, redirect-inspection error 0 0 0
Strict about:blank tab 200 Real new_page call 0 0
Explicit non-strict navigation to the same redirect 200 Real navigate_page call 1 2, including the page resource
Explicit non-strict tab to the same redirect 200 Real MCP tab creation Not counted separately Not counted separately

The persisted profile and SSRF-policy configuration remained byte-for-byte unchanged. The diff changes no configuration reader, data schema, updater, migration, or profile format. Limits: this proves the production browser bridge, MCP subprocess and Chromium boundary in a source checkout; it does not claim a full Gateway/model flow or installed-package upgrade. Package-local SDK declaration resolution was unavailable; the extension-wide typecheck passed with zero errors.

Save the following harness outside the checkout as /tmp/browser-real-mcp-proof.mts, set CHROME_BIN to an available Chromium executable, and run from the clean checkout at the validated head:

CHROME_BIN=/path/to/chromium pnpm exec tsx --tsconfig tsconfig.json /tmp/browser-real-mcp-proof.mts
Complete real-browser reproduction harness
import assert from 'node:assert/strict';
import { spawn, execFileSync } from 'node:child_process';
import { createServer } from 'node:http';
import { mkdtempSync, readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { randomBytes } from 'node:crypto';
import { setTimeout as delay } from 'node:timers/promises';

const repo = process.cwd();
const output = process.env.PROOF_OUTPUT ?? join(tmpdir(), 'browser-real-mcp-proof.json');
const root = mkdtempSync(join(tmpdir(), 'browser-real-mcp-'));
process.env.OPENCLAW_STATE_DIR = join(root, 'state');
process.env.OPENCLAW_CONFIG_PATH = join(root, 'openclaw.json');
process.env.CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS = '1';
const profileDir = join(root, 'chrome');
mkdirSync(profileDir);
const trace = join(root, 'mcp-tools.jsonl');
writeFileSync(trace, '');
const mcpEntry = join(repo, 'extensions/browser/node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js');
const recorder = join(root, 'record-mcp.cjs');
writeFileSync(recorder, `#!/usr/bin/env node
const {spawn}=require('node:child_process');
const {appendFileSync}=require('node:fs');
const child=spawn(process.execPath,[${JSON.stringify(mcpEntry)},...process.argv.slice(2)],{stdio:['pipe','pipe','inherit']});
let buffer='';process.stdin.on('data',chunk=>{buffer+=chunk;let i;while((i=buffer.indexOf('\\n'))!==-1){const line=buffer.slice(0,i);buffer=buffer.slice(i+1);try{const m=JSON.parse(line);if(m.method==='tools/call')appendFileSync(${JSON.stringify(trace)},JSON.stringify({tool:m.params.name})+'\\n');}catch{}}child.stdin.write(chunk);});
process.stdin.on('end',()=>child.stdin.end());child.stdout.pipe(process.stdout);
for(const s of ['SIGTERM','SIGINT'])process.on(s,()=>child.kill(s));
child.on('exit',(code)=>process.exit(code??1));
`, {mode:0o700});
let protectedHits = 0, redirectHits = 0;
const sink = createServer((_req,res)=>{protectedHits++;res.end('<title>protected-control</title>ok');});
const listen = (server:any) => new Promise<number>((resolve)=>server.listen(0,'127.0.0.1',()=>resolve(server.address().port)));
const sinkPort = await listen(sink);
const proxy = createServer((req,res)=>{
  if(req.url?.includes('/proof-redirect')) {redirectHits++;res.writeHead(302,{location:`http://127.0.0.1:${sinkPort}/protected`});res.end();}
  else {res.writeHead(200,{'content-type':'text/html'});res.end('<title>proxy-control</title>ok');}
});
const proxyPort=await listen(proxy);
assert(process.env.CHROME_BIN, 'Set CHROME_BIN to the local Chromium executable');
const chrome=spawn(process.env.CHROME_BIN,[
  '--headless=new','--no-sandbox','--disable-dev-shm-usage','--disable-background-networking',
  '--disable-component-update','--no-first-run','--no-default-browser-check',
  '--remote-debugging-port=0',`--user-data-dir=${profileDir}`,'about:blank',
],{stdio:'ignore'});
let bridge:any;
const summary:any={head:execFileSync('git',['-C',repo,'rev-parse','HEAD'],{encoding:'utf8'}).trim(),environment:'Linux, Node '+process.version+', Chromium 148, packaged chrome-devtools-mcp 1.12.0; real stdio transport and authenticated production browser bridge; isolated temporary state; exact fixture loopback host explicitly allowed by destination policy; strict redirect inspection remains required',root,scenarios:[]};
try {
  for(let i=0;i<100&&!existsSync(join(profileDir,'DevToolsActivePort'));i++)await delay(100);
  assert(existsSync(join(profileDir,'DevToolsActivePort')),'isolated Chrome started');
  const {resolveBrowserConfig}=await import(repo+'/extensions/browser/src/browser/config.ts');
  const {startBrowserBridgeServer,stopBrowserBridgeServer}=await import(repo+'/extensions/browser/src/browser/bridge-server.ts');
  const auth=randomBytes(24).toString('hex');
  const config={enabled:true,defaultProfile:'proof',ssrfPolicy:{dangerouslyAllowPrivateNetwork:false,allowedHostnames:['127.0.0.1']},profiles:{proof:{driver:'existing-session',userDataDir:profileDir,mcpCommand:recorder,color:'#112233'}}};
  writeFileSync(process.env.OPENCLAW_CONFIG_PATH!,JSON.stringify({browser:config}));
  const configBefore=readFileSync(process.env.OPENCLAW_CONFIG_PATH!,'utf8');
  const resolved=resolveBrowserConfig(config as any);
  bridge=await startBrowserBridgeServer({resolved,authToken:auth});
  const request=async(route:string,body:any)=>{
    console.log('real browser request',route);
    const r=await fetch(bridge.baseUrl+route,{signal:AbortSignal.timeout(90000),method:'POST',headers:{authorization:'Bearer '+auth,'content-type':'application/json'},body:JSON.stringify(body)});
    return {status:r.status,body:await r.json() as any};
  };
  const tools=()=>readFileSync(trace,'utf8').split('\n').filter(Boolean).map(line=>JSON.parse(line).tool);
  const blank=await request('/tabs/open',{url:'about:blank'});
  assert.equal(blank.status,200,JSON.stringify(blank));
  assert(tools().includes('new_page'));
  summary.scenarios.push({name:'strict about:blank real MCP control',status:blank.status,newPageCalls:tools().filter(t=>t==='new_page').length});
  const targetId=blank.body.targetId;
  const destination=`http://127.0.0.1:${proxyPort}/proof-redirect`;
  for(const route of ['/navigate','/tabs/open']) {
    const before={redirectHits,protectedHits,tools:tools().length};
    const result=await request(route,{url:destination,targetId});
    assert.equal(result.status,400,JSON.stringify(result));
    assert.match(result.body.error,/requires redirect-hop inspection/);
    assert.equal(redirectHits,before.redirectHits);
    assert.equal(protectedHits,before.protectedHits);
    const dispatched=tools().slice(before.tools);
    assert(!dispatched.includes('navigate_page')&&!dispatched.includes('new_page'));
    summary.scenarios.push({name:'strict '+route,status:result.status,expectedGuard:true,navigateOrNewPageCalls:0,redirectRequests:0,protectedRequests:0});
  }
  bridge.state.resolved.ssrfPolicy={dangerouslyAllowPrivateNetwork:true};
  const before={redirectHits,protectedHits,tools:tools().length};
  const permitted=await request('/navigate',{url:destination,targetId});
  assert.equal(permitted.status,200,JSON.stringify(permitted));
  assert(redirectHits>before.redirectHits&&protectedHits>before.protectedHits,'real redirect reaches controlled protected sink');
  assert(tools().slice(before.tools).includes('navigate_page'));
  summary.scenarios.push({name:'explicit non-strict real navigation control',status:permitted.status,navigateCalls:tools().slice(before.tools).filter(t=>t==='navigate_page').length,redirectRequests:redirectHits-before.redirectHits,protectedRequests:protectedHits-before.protectedHits});
  const opened=await request('/tabs/open',{url:destination});
  assert.equal(opened.status,200,JSON.stringify(opened));
  summary.scenarios.push({name:'explicit non-strict real tab control',status:opened.status});
  assert.equal(readFileSync(process.env.OPENCLAW_CONFIG_PATH!,'utf8'),configBefore);
  summary.persistedProfileAndPolicyUnchanged=true;
  await stopBrowserBridgeServer(bridge.server);bridge=undefined;
  summary.result='passed';
} catch(error) {summary.result='failed';summary.counters={redirectHits,protectedHits};summary.error=String(error);process.exitCode=1;}
finally {
  if(bridge){try {const m=await import(repo+'/extensions/browser/src/browser/bridge-server.ts');await m.stopBrowserBridgeServer(bridge.server);}catch{}}
  chrome.kill('SIGTERM');sink.closeAllConnections();proxy.closeAllConnections();
  await Promise.all([new Promise<void>(r=>sink.close(()=>r())),new Promise<void>(r=>proxy.close(()=>r()))]);
  writeFileSync(output,JSON.stringify(summary,null,2)+'\n',{mode:0o600});
  console.log(JSON.stringify(summary,null,2));
  process.exit(process.exitCode ?? 0);
}

…spection

Chrome MCP (existing-session) navigation dispatches through opaque
navigate_page/new_page tool calls, so redirect hops reach Chrome's network
stack before OpenClaw can check the final URL. Under an explicit strict
browser SSRF policy, refuse http(s) navigation and tab opens on that
transport, matching the existing raw CDP fallback gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: browser size: S labels Nov 2, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 2, 2026
@pgondhi987

pgondhi987 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

ClawSweeper review

Reviewed November 3, 2026, 7:16 AM UTC.

What this changes

This PR rejects strict-policy HTTP(S) navigation and tab creation through Chrome MCP before browser dispatch.

PR surface: Source +17, Tests +30. Total +47 across 6 files.

Merge readiness

Result: ready for maintainer review.

Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🦞 diamond lobster

Reviewed head: d3a9b11d11d2

Review scores

  • Overall: 🐚 platinum hermit
  • Proof: 🐚 platinum hermit (sufficient)
  • Patch quality: 🦞 diamond lobster
  • Security: cleared

Verification

Status: sufficient

How this fits together

The Browser plugin accepts navigation and tab-open requests, applies the configured destination policy, and dispatches permitted operations through Playwright or Chrome MCP.

flowchart TD
  A[Browser request] --> B[Navigation or tab owner]
  B --> C[Shared navigation policy]
  C --> D[Strict Chrome MCP rejection]
  C --> E[Permitted MCP operation]
  E --> F[Chromium network]
  F --> G[Result URL validation]
Loading

Before merge

  • None from local ClawSweeper.
Review details

Best possible solution:

Retain the shared preflight at both Chrome MCP entry points, preserving about:blank and the existing non-strict policy modes.

Do we have a high-confidence way to reproduce the issue?

Current-main source exposes the initial-check, opaque MCP dispatch, and post-result-check sequence; the supplied real-browser proof exercises the repaired boundary, but this read-only review ran no target code.

Is this the best way to solve the issue?

The fix reuses the existing strict redirect-inspection predicate and navigation-policy owner without adding state, configuration, or a competing enforcement path.

AGENTS.md: found_applied

Codex review notes: model internal, reasoning medium; reviewed against 5918b1d.

Label details

Label justifications:

  • P2: This fixes a concrete enforcement gap limited to explicitly strict Chrome MCP profiles.
  • merge-risk: 🚨 compatibility: Existing strict existing-session profiles will refuse HTTP(S) navigation and tab opens; the maintainer-authored PR explicitly accepts this restriction and supplies recovery guidance.
Evidence reviewed

PR surface:

Area Files Added Removed Net
Source 3 20 3 +17
Tests 2 30 0 +30
Docs 1 1 1 +0
Config 0 0 0 +0
Generated 0 0 0 +0
Other 0 0 0 +0
Total 6 51 4 +47
  • Pinned introduced change: The introduced diff adds one shared Chrome MCP preflight and applies it to both navigation and tab creation, with two distinct dispatch-boundary regressions and matching documentation.
  • Current-main enforcement gap: Current main checks the initial destination, dispatches navigateChromeMcpPage, and checks the result afterward; it lacks the proposed redirect-inspection rejection.
  • Existing transport contract: The raw CDP fallback already refuses network navigation requiring redirect inspection; historical changes preserved about:blank and later limited strict enforcement to explicit false.
  • Supplied final-effect proof: The fully supplied PR body reports authenticated production bridge requests using isolated Chromium 148 and packaged chrome-devtools-mcp 1.12.0: strict navigation and tab opens returned 400 with zero navigation dispatch and zero destination requests, while about:blank and explicitly permitted redirect controls succeeded. The complete harness supports the declared scenarios; it was inspected, not executed during this review.
  • Accepted compatibility tradeoff: The MEMBER-authored PR explicitly chooses refusal of HTTP(S) operations for strict existing-session profiles, preserves other policy modes, and provides an actionable openclaw-driver error and documentation.
  • Review policy and checkout: Root and applicable extensions/docs AGENTS.md files were read, alongside simplification and test-boundary guidance. No maintainer-notes directory exists. The checkout remained clean; supplied checks are incomplete, with no reported failing check attributable to this diff.

@pgondhi987

Copy link
Copy Markdown
Contributor Author

Behavior proof for d3a9b11d11d21a6b51b7e4004c0e9a781f8452bd:

The authenticated production browser bridge ran on Linux/Node 24.20.0 with an isolated real Chromium 148 session and packaged Chrome DevTools MCP 1.12.0. No browser, MCP, DNS, HTTP or policy adapter was mocked. A transparent stdio recorder counted actual tool names; local servers counted redirect and protected-endpoint requests.

  • Strict POST /navigate and POST /tabs/open: each returned 400 at the redirect-inspection guard, with zero navigate_page/new_page dispatch and zero redirect or protected requests. The fixture host was explicitly allowed so an unrelated destination-address rejection could not satisfy the scenario.
  • Positive controls: strict about:blank opened through a real new_page call. Explicit non-strict navigation to the same redirect returned 200, emitted one real navigate_page call, and reached the redirect once and protected endpoint twice, including its page resource. Explicit non-strict tab opening also returned 200.
  • Exact command: CHROME_BIN=/path/to/chromium pnpm exec tsx --tsconfig tsconfig.json /tmp/browser-real-mcp-proof.mts — all five scenarios passed. The complete harness and results are in the PR body. The persisted profile and SSRF policy were unchanged.
  • Existing focused validation: pnpm test extensions/browser/src/browser/server-context.existing-session.test.ts extensions/browser/src/browser/server.agent-contract-core.test.ts extensions/browser/src/browser/routes/agent.existing-session.test.ts extensions/browser/src/browser/routes/agent.snapshot.local-managed.test.ts extensions/browser/src/browser/routes/tabs.test.ts — five files, 180 tests passed. Focused lint, formatting, extension-wide typecheck and git diff --check passed.

Limits: real browser bridge/MCP/Chromium source-checkout proof; no full Gateway/model flow or installed-package upgrade. No configuration reader, updater, migration, data schema or profile format changes. Package-local SDK declaration resolution was unavailable; the extension-wide typecheck passed.

Compatibility: strict-mode existing-session profiles refuse HTTP(S) navigation and new tabs; use driver openclaw for strict navigation. Other policy modes retain their behavior.

@pgondhi987

Copy link
Copy Markdown
Contributor Author

Verification before merge:

Head: d3a9b11d11d21a6b51b7e4004c0e9a781f8452bd.

The focused browser fix rejects strict-policy HTTP(S) navigation and tab creation before Chrome MCP dispatch because that transport cannot inspect redirect hops. Exact-head independent local review reached Platinum overall, Diamond for the patch, with sufficient real behavior proof, cleared security, and no findings or outstanding maintainer decision. Optional additional reviewers were disabled.

On Linux/Node 24.20.0, Chromium 148 and packaged Chrome DevTools MCP 1.12.0, the authenticated production bridge returned 400 for both strict HTTP routes, with zero navigation/tab-opening MCP calls and zero redirect/protected-endpoint requests. Real about:blank and explicit non-strict navigation/tab controls succeeded. The non-strict navigation reached the same controlled redirect and protected endpoint. Stored profile and policy configuration stayed unchanged.

Commands and results:

  • pnpm test extensions/browser/src/browser/server-context.existing-session.test.ts extensions/browser/src/browser/server.agent-contract-core.test.ts extensions/browser/src/browser/routes/agent.existing-session.test.ts extensions/browser/src/browser/routes/agent.snapshot.local-managed.test.ts extensions/browser/src/browser/routes/tabs.test.ts — five files, 180 tests passed; added regressions were red against base production code and green with the fix.
  • CHROME_BIN=/path/to/chromium pnpm exec tsx --tsconfig tsconfig.json /tmp/browser-real-mcp-proof.mts — all five real-browser scenarios passed; the complete harness is in the PR body.
  • Focused lint, formatting, extension-wide typecheck and git diff --check passed.

Final informational CI snapshot: 43 successful, 72 skipped, 2 cancelled, zero failed or pending checks. Both cancelled entries are Auto response jobs cancelled before any step; neither exercises the changed browser code. No CI repair was needed.

Limits: source-checkout browser bridge/MCP/Chromium proof, without a full Gateway/model flow or installed-package upgrade. No updater, migration, data-schema or profile-format changes. Package-local SDK declarations were unavailable; extension-wide typechecking passed.

Regression risk is limited to the two guarded dispatch paths. Intended user behavior change: strict existing-session profiles now reject HTTP(S) navigation and tab opens; use driver openclaw for strict navigation. about:blank and other policy modes retain their behavior. This is a focused fix for the transport limitation, supported by both blocked-path and working-control evidence. The PR remains unmerged.

@pgondhi987

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@pgondhi987

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR blocks HTTP(S) navigation and tab opening through Chrome MCP when strict redirect inspection is required.

Example: An existing-session profile with dangerouslyAllowPrivateNetwork explicitly false opens http://93.184.216.34/redirect.

  • Before: Chrome MCP receives the operation before OpenClaw can inspect any redirect hops.
  • After: OpenClaw rejects the operation before MCP dispatch and recommends using the openclaw driver.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused enforcement repair with real bridge/MCP/Chromium evidence, distinct boundary regressions, and no identified code defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): At the reviewed head, supplied authenticated production bridge results exercise real Chromium and packaged Chrome MCP: both strict HTTP routes reject before navigation dispatch and destination I/O, while about:blank and explicitly permitted redirects succeed; no persistent authority is introduced.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Strict-policy Chrome MCP navigation can send redirect requests before OpenClaw checks their destinations.
Reason: The change restores an existing strict-mode requirement at both affected dispatch boundaries, with the compatibility restriction explicitly accepted in the supplied maintainer direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR closes a current strict-policy enforcement gap with a focused change and supplied real-browser proof; no introduced correctness defect was found.

Priority: P2
Reviewed head: d3a9b11d11d21a6b51b7e4004c0e9a781f8452bd

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Browser plugin receives navigation and tab-open requests, applies destination policy, and dispatches permitted operations through Playwright or Chrome MCP.

flowchart TD
A[Browser HTTP request] --> B[Navigation or tab owner]
B --> C[Shared navigation policy]
C --> D[Reject strict MCP network operation]
C --> E[Permit supported operation]
E --> F[Chrome MCP and Chromium]
F --> G[Validate result URL]
Loading

Technical review

Best possible solution:

Retain the shared preflight at both Chrome MCP dispatch boundaries while preserving about:blank and existing non-strict modes.

Do we have a high-confidence way to reproduce the issue?

Current-main source exposes opaque MCP dispatch between initial and final URL checks, establishing the enforcement gap; this read-only review inspected supplied after-fix evidence without running target code.

Is this the best way to solve the issue?

The patch is a small complete fix for these two entry points because it reuses the existing policy owner and redirect-inspection predicate without adding state or parallel enforcement machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against df80ba7a66a7.

Provenance checked

  • Chrome MCP navigation and tab-open preflight keeps the original intent (8eeb7f0: The browser ownership migration carried these operations into the bundled plugin; the later Express 5 refactor explicitly preserved route behavior.)
  • Strict redirect inspection and about:blank keeps the original intent (8cfdc8d: Separate local browser control-plane access from navigation restrictions while preserving about:blank bootstrap; bf1d490 later limited strict behavior to explicit false.)
  • Browser SSRF configuration documentation keeps the original intent (342da13: Explain the existing distinction between unset, explicit false, and true without changing runtime defaults.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 424fb49 adds extensions/browser/src/browser/navigation-guard.ts:83 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 424fb49de405; files: extensions/browser/src/browser/navigation-guard.ts)
  • Mariano: Raw commit 8cfdc8d adds extensions/browser/src/browser/navigation-guard.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 8cfdc8dea151; files: extensions/browser/src/browser/navigation-guard.ts)

PR surface

Source +17, Tests +30, Docs 0. Total +47 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 20 3 +17
Tests 2 30 0 +30
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 51 4 +47

Labels

Label changes:

  • add P2: The concrete enforcement gap affects explicitly strict Chrome MCP profiles, with a limited affected surface.
  • add merge-risk: 🚨 compatibility: Existing strict existing-session profiles will refuse HTTP(S) navigation and tab opening; this restriction is explicitly accepted by the supplied maintainer direction and documented with recovery guidance.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The concrete enforcement gap affects explicitly strict Chrome MCP profiles, with a limited affected surface.
  • merge-risk: 🚨 compatibility: Existing strict existing-session profiles will refuse HTTP(S) navigation and tab opening; this restriction is explicitly accepted by the supplied maintainer direction and documented with recovery guidance.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 3, 2026, 8:15 AM ET / 13:15 UTC.

@pgondhi987
pgondhi987 merged commit 0e7aab7 into openclaw:main Nov 3, 2026
15 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…spection (openclaw#191271)

Chrome MCP (existing-session) navigation dispatches through opaque
navigate_page/new_page tool calls, so redirect hops reach Chrome's network
stack before OpenClaw can check the final URL. Under an explicit strict
browser SSRF policy, refuse http(s) navigation and tab opens on that
transport, matching the existing raw CDP fallback gate.

Co-authored-by: Claude Opus 5.5 <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 6, 2026
…spection (#191271)

Chrome MCP (existing-session) navigation dispatches through opaque
navigate_page/new_page tool calls, so redirect hops reach Chrome's network
stack before OpenClaw can check the final URL. Under an explicit strict
browser SSRF policy, refuse http(s) navigation and tab opens on that
transport, matching the existing raw CDP fallback gate.

Co-authored-by: Claude Opus 5.5 <[email protected]>

Backport-source: 0e7aab7
Backport-scope: Use a dedicated preflight for Chrome MCP navigate/new-page that rejects network navigation requiring inspectable redirects. Retain initial validation, post-navigation guard, currentness and non-strict/about:blank behavior.

Adapted production backport for release/2026.11.2. Upstream validation descriptions refer to source history; candidate regression coverage and remote qualification are tracked separately.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: browser merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant