fix(browser): reject credentialed navigation URLs#82490
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 9:24 PM ET / 01:24 UTC. Summary PR surface: Source +49, Tests +57. Total +106 across 5 files. Reproducibility: yes. source-level. Current main forwards browser open/navigate URL input toward local or node-proxy dispatch without URL-userinfo rejection, and the PR helper can be shown from the diff to let malformed credential-like strings fall through before dispatch. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Reject and redact both parsed and malformed credential-like HTTP(S) browser navigation inputs before any local/proxy/Chromium dispatch, then merge only after redacted live browser/proxy proof and maintainer acceptance of the fail-fast policy. Do we have a high-confidence way to reproduce the issue? Yes, source-level. Current main forwards browser open/navigate URL input toward local or node-proxy dispatch without URL-userinfo rejection, and the PR helper can be shown from the diff to let malformed credential-like strings fall through before dispatch. Is this the best way to solve the issue? No, not yet. The browser plugin input/guard path is the right boundary, but the helper must reject malformed credential-like inputs before dispatch and the PR still needs live proof plus maintainer acceptance of the compatibility policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b3b51b0c9185. Label changesLabel justifications:
Evidence reviewedPR surface: Source +49, Tests +57. Total +106 across 5 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
c120895 to
fb45066
Compare
fb45066 to
57441fa
Compare
57441fa to
df41c1a
Compare
|
Heads up: this PR needs to be updated against current |
df41c1a to
0e1f69c
Compare
|
Thank you, @lidge-jun — this PR identified the right browser credential-leak boundary and provided the base for the landed fix. I carried the change forward as #102952 and improved it to use one canonical parser before both host/Browser-node dispatch and server-side DNS/SSRF checks. The landed rewrite also redacts malformed credential-bearing input and live-verifies that explicit Browser HTTP credentials and authenticated CDP endpoint URLs still work. Landed in #102952 as I attempted the normal native maintainer takeover path first. GitHub reported Thanks again for the contribution. |
Summary
Closes #55365
Real behavior proof (required for external PRs)
Behavior addressed: browser open/navigate requests no longer pass HTTP(S) URLs with embedded credentials such as
https://user:[email protected]/paththrough to the browser proxy, local browser client, Playwright, or Chromium. Invalid URL diagnostics also redact credential-like userinfo instead of echoing the raw secret-bearing input.Real environment tested: macOS local workstation, Node v24.14.1, pnpm v11.1.0, OpenClaw built from source at PR head 28c0451.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.test.ts extensions/browser/src/browser/pw-tools-core.snapshot.navigate-guard.test.ts
node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/browser/src/browser/navigation-url-userinfo.ts extensions/browser/src/browser/navigation-guard.ts extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.ts extensions/browser/src/browser-tool.test.ts
git diff --check origin/main..HEAD
Evidence after fix:
$ node scripts/run-vitest.mjs extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.test.ts extensions/browser/src/browser/pw-tools-core.snapshot.navigate-guard.test.ts
Test Files 3 passed (3)
Tests 84 passed (84)
$ node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/browser/src/browser/navigation-url-userinfo.ts extensions/browser/src/browser/navigation-guard.ts extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.ts extensions/browser/src/browser-tool.test.ts
Found 0 warnings and 0 errors.
Finished in 3.0s on 5 files with 216 rules using 1 threads.
$ git diff --check origin/main..HEAD
(no output)
Observed result after fix: the focused tests prove credentialed network navigation URLs are rejected before DNS lookup, before direct browser open/navigate calls, and before gateway proxy dispatch. The same test set also proves invalid URL errors redact
https://user:secret@ashttps://[redacted]@and do not include the secret.What was not tested: live navigation against a real Chromium instance and remote browser-node proxy transport on Linux/Windows.
Verification
node scripts/run-vitest.mjs extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.test.ts extensions/browser/src/browser/pw-tools-core.snapshot.navigate-guard.test.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/browser/src/browser/navigation-url-userinfo.ts extensions/browser/src/browser/navigation-guard.ts extensions/browser/src/browser/navigation-guard.test.ts extensions/browser/src/browser-tool.ts extensions/browser/src/browser-tool.test.tsgit diff --check origin/main..HEAD