aboutsummaryrefslogtreecommitdiff
path: root/test-suite/manifest.json
diff options
context:
space:
mode:
authorTianren Dong <tianrendong.dtr@gmail.com>2026-05-31 14:19:04 -0400
committerTianren Dong <tianrendong.dtr@gmail.com>2026-05-31 14:19:04 -0400
commitd21ebf7b96c90943ab48ffcd6d5b02c6f7438c04 (patch)
tree00a005deb29fd4071c0d67be8e533bab5972d850 /test-suite/manifest.json
parent0fc5b8950601a36dfffdc8f7163bb12fb94f353e (diff)
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.
Diffstat (limited to 'test-suite/manifest.json')
-rw-r--r--test-suite/manifest.json53
1 files changed, 52 insertions, 1 deletions
diff --git a/test-suite/manifest.json b/test-suite/manifest.json
index 752c455..0ebb313 100644
--- a/test-suite/manifest.json
+++ b/test-suite/manifest.json
@@ -1510,7 +1510,7 @@
"strict-csp"
],
"notes": [
- "chrome_snapshot/chrome_evaluate may fail on this page because script-src omits unsafe-eval; this is intentional. Use screenshot plus viewport coordinates, then read verdict from dashboard/localStorage after leaving CSP page."
+ "This challenge exercises the pure screenshot + viewport-coordinate path (no snapshot/evaluate needed). Note: as of the CDP CSP bypass, chrome_snapshot/chrome_evaluate DO work here even though script-src omits unsafe-eval (see challenge 42 strict-csp-evaluate). Read verdict from dashboard/localStorage after leaving the CSP page."
],
"manualBaseline": "unverified",
"gradeSource": "page"
@@ -1626,5 +1626,56 @@
],
"manualBaseline": "unverified",
"gradeSource": "page"
+ },
+ {
+ "id": "strict-csp-evaluate",
+ "file": "challenges/42-strict-csp-evaluate.html",
+ "category": "csp",
+ "difficulty": "L2",
+ "gate": "core",
+ "goal": "On a page with strict CSP (script-src 'self', no unsafe-eval), use chrome_evaluate + chrome_snapshot via CDP to read a JS-only secret (window.__cspToken), then submit it with trusted input.",
+ "expected": {
+ "synthetic": "FAIL",
+ "trusted": "PASS",
+ "manual": "PASS"
+ },
+ "recipe": [
+ {
+ "tool": "chrome_evaluate",
+ "params": {
+ "expression": "window.__cspToken"
+ }
+ },
+ {
+ "tool": "chrome_fill",
+ "params": {
+ "selector": "#tokenInput",
+ "value": "$RESULT_OF_chrome_evaluate",
+ "trusted": true
+ }
+ },
+ {
+ "tool": "chrome_click",
+ "params": {
+ "selector": "#verify",
+ "trusted": true
+ }
+ }
+ ],
+ "requires": {
+ "cdp": true
+ },
+ "tags": [
+ "csp",
+ "evaluate",
+ "snapshot",
+ "strict-csp",
+ "cdp-bypass"
+ ],
+ "notes": [
+ "Regression guard for the CDP CSP bypass: chrome_evaluate and chrome_snapshot must work even though script-src omits unsafe-eval (eval/new Function are blocked). The token is non-enumerable and never in the DOM, so it can only be obtained via chrome_evaluate. Runner must substitute the evaluate result into the fill value. synthetic FAIL is due to the trusted-click gate, not eval availability."
+ ],
+ "manualBaseline": "unverified",
+ "gradeSource": "page"
}
]