From 930fc54fb7d81141585d8f45b458b7e8fd9d3cbe Mon Sep 17 00:00:00 2001 From: Philipp Desgranges Date: Fri, 3 Jul 2026 12:21:31 +0200 Subject: [PATCH] feat(browse): allowlist Input.dispatchMouseEvent for trusted mouse gestures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some widgets only open on a genuine OS-level mouse event and ignore all JS/synthetic clicks (verified on Personio's Gefahrtarifstelle "Monat auswählen" dropdown, 2026-07-03). Add Input.dispatchMouseEvent to CDP_ALLOWLIST (scope: tab, output: trusted) so `$B cdp` can force a real click. Delivers input to the focused tab only; returns just an ack (no page content), so no exfil/injection vector. cdp-allowlist.test.ts: 6 pass. Co-Authored-By: Claude Opus 4.8 (1M context) --- browse/src/cdp-allowlist.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browse/src/cdp-allowlist.ts b/browse/src/cdp-allowlist.ts index b9c3a9538..21a5bb621 100644 --- a/browse/src/cdp-allowlist.ts +++ b/browse/src/cdp-allowlist.ts @@ -199,6 +199,14 @@ export const CDP_ALLOWLIST: ReadonlyArray = Object.freeze([ output: 'untrusted', justification: 'Inspect properties of an existing remote object. Read-only; output may contain page data.', }, + // ─── Input (synthetic trusted user gestures) ─────────────── + { + domain: 'Input', + method: 'dispatchMouseEvent', + scope: 'tab', + output: 'trusted', + justification: 'Trusted mouse gesture for widgets that ignore JS clicks (e.g. Personio Gefahrtarifstelle "Monat auswählen" dropdown). Focused tab only; returns an ack, no page content.', + }, ]); const CDP_ALLOWLIST_INDEX: Map = new Map(