From d21ebf7b96c90943ab48ffcd6d5b02c6f7438c04 Mon Sep 17 00:00:00 2001 From: Tianren Dong Date: Sun, 31 May 2026 14:19:04 -0400 Subject: 0.15.29: CSP bypass via CDP Runtime.evaluate for evaluate/snapshot/waitFor/initScript - evaluateInTab/executeInTab now run through CDP Runtime.evaluate instead of new Function() in MAIN world, so chrome_evaluate/chrome_snapshot work on pages that block unsafe-eval (github.com, many bank/SaaS apps). Preserves value markers (undefined/function/symbol/bigint/Error), DOMRect expansion, and the expression/statement fallback; keeps {ok,value} error envelope. - page.waitFor polls via service-worker-side CDP evaluation. - chrome_navigate initScript uses Page.addScriptToEvaluateOnNewDocument. - Add npm test (test-suite/unit/csp-eval.test.mjs) and in-browser regression challenge 42 strict-csp-evaluate; update challenge 39 notes + docs/primer. --- docs/EXAMPLES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/EXAMPLES.md') diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index bf3aa0a..434d0f8 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -161,6 +161,6 @@ Interactive tools use Chrome's real input layer by default: clicks, typing, fill - fullscreen and other user-activation checks - pages where DOM injection/evaluate is limited, if the agent can use screenshots + coordinates -Strict CSP note: `chrome_snapshot`/`chrome_evaluate` may be blocked on pages that disallow `unsafe-eval`; `chrome_screenshot`, tab/navigation tools, and real input still work. +Strict CSP note: `chrome_snapshot`/`chrome_evaluate` work even on pages that disallow `unsafe-eval`, because they run via CDP `Runtime.evaluate` (not page-level `eval`/`new Function`), which is not subject to page CSP. `chrome_screenshot`, tab/navigation tools, and real input also work under any CSP. Chrome may show its debugger banner while pi-chrome is attached. -- cgit v1.2.3