Commit Graph

127 Commits

Author SHA1 Message Date
Peter Steinberger
0ebeee8b0d chore: enable consistent-return 2026-04-10 20:56:43 +01:00
Peter Steinberger
d015986265 fix: preserve browser cdp ssrf policy 2026-04-10 20:45:45 +01:00
Peter Steinberger
8e9e584b1e fix: validate browser profile driver before cdp policy 2026-04-10 20:31:27 +01:00
Peter Steinberger
d2c0440fac ci: fix current main additional checks 2026-04-10 20:28:48 +01:00
Agustin Rivera
121c452d66 fix(browser): tighten strict browser hostname navigation (#64367)
* fix(browser): tighten strict browser hostname navigation

* fix(browser): address review follow-ups

* chore(changelog): add strict browser hostname navigation entry

* fix(browser): remove stale state prop from SelectionDeps call site

The PR's SelectionDeps uses getSsrFPolicy instead of the full state
object; the state property was leftover from an earlier iteration.

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 13:18:53 -06:00
Peter Steinberger
04c8026d03 chore: enable no-unnecessary-type-arguments 2026-04-10 20:14:49 +01:00
Agustin Rivera
109267b82a Handle subframe document navigations in browser guards (#64371)
* fix(browser): guard subframe document navigations

Co-authored-by: zsx <git@zsxsoft.com>

* fix(browser): preserve quarantine on subframe blocks

* chore(changelog): add subframe SSRF guard entry

* fix(browser): fail closed when subframe frame resolution throws

isSubframeDocumentNavigationRequest now returns true (apply SSRF
check) instead of false (skip check) when request.frame() throws,
so transient renderer churn cannot bypass the subframe navigation
policy guard.

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 12:51:23 -06:00
Peter Steinberger
b2df0ed4b7 fix: align browser ssrf policy typing 2026-04-10 19:49:46 +01:00
Peter Steinberger
abc499ec49 fix: preserve cdp guarded fetch dispatchers 2026-04-10 19:49:09 +01:00
Peter Steinberger
81ead0bc5b fix(browser): keep legacy ssrf alias internal 2026-04-10 19:46:37 +01:00
Agustin Rivera
905f19230a Align external marker span mapping (#63885)
* fix(markers): align external marker spans

* fix(browser): ssrfPolicy defaults fail-closed for unconfigured installs (GHSA-53vx-pmqw-863c)

* fix(browser): enforce strict default SSRF policy

* chore(changelog): add browser SSRF default + marker alignment entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 12:35:20 -06:00
Agustin Rivera
daeb74920d fix(browser): guard existing-session navigation (#64370)
* fix(browser): guard existing-session navigation

Co-authored-by: zsx <git@zsxsoft.com>

* fix(browser): tighten interaction navigation guard

* fix(browser): tighten existing-session nav guard

* fix(browser): fail closed on unstable existing-session probes

* fix(browser): add follow-up probe for late URL transitions in existing-session nav guard

* fix(browser): keep probing through full navigation window

* fix(browser): reset stability flag on probe error in existing-session nav guard

* chore(changelog): add Chrome MCP interaction SSRF guard entry

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 12:31:41 -06:00
Peter Steinberger
59925c1a74 chore: update dependencies and oxc tooling 2026-04-10 19:28:42 +01:00
Peter Steinberger
925a499d84 ci: fix additional guard failures 2026-04-10 19:23:10 +01:00
Peter Steinberger
f6ed276f51 style: apply updated formatter output 2026-04-10 19:17:39 +01:00
Michael Appel
e0b8ddc1a5 fix(browser): apply three-phase interaction navigation guard to pressKey and type(submit) [AI-assisted] (#63889)
* fix: address issue

* chore(changelog): add pressKey/type SSRF guard entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 11:27:53 -06:00
Agustin Rivera
8dfbf3268b fix(browser): gate sandbox noVNC helper auth
Require bridge auth before /sandbox/novnc token redemption and keep the noVNC observer URL out of model-visible prompt context.

Local verification:
- pnpm test extensions/browser/src/browser/bridge-server.auth.test.ts src/agents/sanitize-for-prompt.test.ts src/agents/pi-embedded-runner.buildembeddedsandboxinfo.test.ts

Note: pnpm check currently fails on latest main in unrelated files (src/agents/tools/message-tool.ts and src/gateway/mcp-http.test.ts), outside this PR diff.

Thanks @eleqtrizit.

Co-authored-by: eleqtrizit <31522568+eleqtrizit@users.noreply.github.com>
2026-04-10 18:01:26 +01:00
Peter Steinberger
81ae34c434 test: keep browser selection cdp guard profile-aware 2026-04-10 17:35:54 +01:00
Peter Steinberger
58ee5e48d1 test: fix browser and matrix verification 2026-04-10 17:25:04 +01:00
Peter Steinberger
fa2ee2af85 test: enforce browser cdp policy before playwright 2026-04-10 17:21:19 +01:00
Devin Robison
48c0347921 fix: in the browser extension s tabs action route the (#310) (#63332)
* fix: in the browser extension s tabs action route the (#310)

* fix(browser): fail closed for tab close and CDP redirects

* fix(browser): sanitize tab SSRF policy errors

* chore(changelog): add browser tabs action policy enforcement entry

* fix(browser): differentiate CDP endpoint blocks from navigation blocks in error mapping

Split SsrFBlockedError handling so navigation-target policy failures
(from assertBrowserNavigationAllowed) surface as 'browser navigation
blocked by policy' while CDP endpoint policy failures (from
assertCdpEndpointAllowed) surface as 'browser endpoint blocked by
policy'. Both stay sanitized so raw policy details still do not leak
to callers.

- Add BrowserCdpEndpointBlockedError (extends BrowserError, 400).
- assertCdpEndpointAllowed now catches SsrFBlockedError and rethrows
  as BrowserCdpEndpointBlockedError so the route error mapping can
  route endpoint vs navigation failures to the right user-facing
  message without inspecting stack strings.
- toBrowserErrorResponse: raw SsrFBlockedError now maps to the
  navigation-blocked message; endpoint-blocked errors are handled by
  the existing BrowserError branch and keep the endpoint-blocked
  message.
- Update tests that exercised the endpoint path to assert the new
  error class instead of the raw SSRF message.

* fix(browser): move SSRF check after cache hit and thread ssrfPolicy through tryTerminateExecutionViaCdp

- connectBrowser: move assertCdpEndpointAllowed after cache lookup so
  transient DNS failures don't break active cached sessions.
- tryTerminateExecutionViaCdp: accept ssrfPolicy and run
  assertCdpEndpointAllowed before HTTP/WS I/O so the terminate path
  doesn't bypass SSRF policy enforcement.
- forceDisconnectPlaywrightForTarget: thread ssrfPolicy through to
  tryTerminateExecutionViaCdp.

* fix(browser): drop redundant pre-Playwright SSRF checks so cached sessions survive DNS blips

Remove assertProfileCdpEndpointAllowed() calls that precede
Playwright-backed tab operations (listPagesViaPlaywright,
focusPageByTargetIdViaPlaywright, closePageByTargetIdViaPlaywright)
since connectBrowser already runs the check on cache miss.

Keep the checks before raw CDP HTTP calls (fetchJson/fetchOk for
/json/list, /json/activate, /json/close) where there is no
connection cache.

Add comment on fetchCdpChecked explaining why redirect blocking
covers all CDP HTTP paths, not just probes.
2026-04-10 10:03:16 -06:00
Peter Steinberger
9f864c9ade fix: guard browser control fetches 2026-04-10 12:46:26 +01:00
Vincent Koc
0e54440ecc fix(cycles): remove browser cli and tlon runtime seams 2026-04-10 11:45:28 +01:00
Josh Avant
f096fc4406 Browser: unify /act route action execution and contract errors (#63977)
* Browser: unify agent act route execution and contracts

* Browser tests: lock act error codes and dedupe harness dispatch

* Browser tests: slim act harness dispatch map

* Browser act: enforce top-level targetId match

* Browser tests: cover missing act error codes

* Browser act: restore wait cap and reject zero resize dims

* Docs: document /act error contract

* Browser act: lock selector precedence and positive resize validation

* Browser act: restore interaction cap and harden contract tests

* docs: note browser act contract consolidation (#63977) (thanks @joshavant)
2026-04-09 22:54:33 -05:00
Josh Avant
33ad806a14 Browser: consolidate duplicate helper surfaces via facade delegation (#63957)
* Plugin SDK: route browser helper surfaces through browser facade

* Browser doctor flow: add facade path regression and export parity guards

* Contracts: dedupe browser facade parity checks without reducing coverage

* Browser tests: restore host-inspection semantics coverage in extension

* fix: add changelog note for browser facade consolidation (#63957) (thanks @joshavant)
2026-04-09 19:49:04 -05:00
Altay
8cf02e7c47 fix(ci): clear check-additional follow-up regressions (#63934)
* fix(ci): route messaging temp files through openclaw tmp dir

* fix(ci): clear qa-lab follow-up guardrails

* fix(ci): own-check ACP fallback resolvers

* fix(ci): preserve memory-core write error causes

* fix(ci): narrow qa-channel boundary alias

* fix(test): type memory-core dreaming api stubs
2026-04-09 23:47:59 +01:00
Peter Steinberger
766a676d48 test: update browser and reply mocks for direct imports 2026-04-09 05:52:07 +01:00
Pavan Kumar Gondhi
b1724f8b5f fix(browser): auto-generate browser control auth token for none/trusted-proxy modes [AI] (#63280)
* fix: address issue

* fix: address review feedback

* fix: finalize issue changes

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* docs: add changelog entry for PR merge
2026-04-09 09:55:24 +05:30
Peter Steinberger
0c278bb93c refactor: break runtime import cycles 2026-04-09 03:56:22 +01:00
Peter Steinberger
f2c0482d3c fix: surface delayed browser navigation blocks 2026-04-09 00:42:52 +01:00
Peter Steinberger
c62a39c7a1 fix: restore main ci 2026-04-08 23:30:18 +01:00
Agustin Rivera
5f5b3d733b fix(browser): re-check interaction-driven navigations (#63226)
* fix(browser): guard interaction-driven navigations

* fix(browser): avoid rechecking unchanged interaction urls

* fix(browser): guard delayed interaction navigations

* fix(browser): guard interaction-driven navigations for full action duration

* fix(browser): avoid waiting on interaction grace timer

* fix(browser): ignore same-document hash-only URL changes in navigation guard

* fix(browser): dedupe interaction nav guards

* fix(browser): guard same-URL reloads in interaction navigation listeners

* docs(changelog): add interaction navigation guard entry

* fix(browser): drop duplicate ssrfPolicy props

* fix(browser): tighten interaction navigation guards

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-08 13:39:07 -06:00
Agustin Rivera
dafcaf9d69 fix(browser): harden browser control override loading (#62663)
* fix(browser): harden browser control overrides

* fix(lint): prepare boundary artifacts for extension oxlint

* docs(changelog): add browser override hardening entry

* fix(lint): avoid duplicate boundary prep

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-08 13:24:47 -06:00
Peter Steinberger
a5737f83af refactor: dedupe browser navigation guard tests 2026-04-08 15:58:45 +01:00
Peter Steinberger
95e397a266 refactor: dedupe repeated test helpers 2026-04-08 09:58:22 +01:00
Peter Steinberger
aaa88398bf refactor: dedupe browser trimmed readers 2026-04-08 00:09:41 +01:00
Peter Steinberger
1868f301ed refactor: dedupe browser trimmed readers 2026-04-08 00:09:41 +01:00
Peter Steinberger
7897fb9c84 refactor: dedupe locale lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger
5b090561fb refactor: dedupe browser whatsapp qa lowercase helpers 2026-04-07 20:58:01 +01:00
Agustin Rivera
e5aae5e056 fix(browser): align browser.proxy profile mutation guards (#60489)
* fix(browser): block proxy profile mutations

* docs(changelog): add browser proxy guard entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-07 13:00:21 -06:00
pgondhi987
14ec1ac50f fix(browser): harden SSRF redirect guard against non-navigation document hops [AI] (#62355)
* fix: address issue

* fix: address PR review feedback

* docs(changelog): add browser redirect SSRF entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-07 11:37:31 -06:00
Agustin Rivera
049acf23cb fix(browser): guard interaction-driven navigations 2026-04-07 10:03:12 -07:00
Peter Steinberger
9314bb7180 refactor: dedupe extension lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
dfe1ef9041 Browser: remove timer dependency from proxy tests 2026-04-07 15:07:57 +01:00
Peter Steinberger
47563305a2 Tests: isolate full-suite state leaks 2026-04-07 14:39:28 +01:00
Peter Steinberger
cb28d8d6b8 refactor: dedupe browser and memory lowercase helpers 2026-04-07 13:44:41 +01:00
Peter Steinberger
2f51dfca01 test: speed up browser auth auto-token test 2026-04-07 11:57:25 +01:00
Peter Steinberger
5de04bc1d5 refactor: dedupe extension lowercase query helpers 2026-04-07 11:18:18 +01:00
Peter Steinberger
4dc16e1567 refactor: dedupe lowercase normalizer readers 2026-04-07 11:18:18 +01:00
Peter Steinberger
424b65b697 refactor: dedupe bluebubbles and zalouser readers 2026-04-07 08:40:34 +01:00