Skip to content

Commit 79616c2

Browse files
committed
test: implement fingerprinting and property collection differential analysis for e2e tests
1 parent 1b6692a commit 79616c2

6 files changed

Lines changed: 463 additions & 28 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ web/oxc_parser_wasm_bg.wasm
77
node_modules/
88
coverage/
99
.cache/
10+
artifacts/
1011
rewriter-rs/target/
1112
/wasm-kernel
1213
GOAL.md

test/e2e/expected-deltas.json

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,72 @@
88
"proxy": "",
99
"native": "default-src 'none'; connect-src 'none'"
1010
}
11-
}
11+
},
12+
"nativeVsZeroProxyRawSetDifferentialAllowlist": [
13+
{
14+
"id": "membrane-csp-header",
15+
"pattern": "^policyHeaders\\.csp$",
16+
"reason": "ZeroProxy replaces target CSP with the membrane CSP on the proxy origin."
17+
},
18+
{
19+
"id": "membrane-report-only-header",
20+
"pattern": "^policyHeaders\\.reportOnly$",
21+
"reason": "ZeroProxy strips upstream report-only policy before constructing proxy responses."
22+
},
23+
{
24+
"id": "canvas-randomization",
25+
"pattern": "^surface\\.fingerprint\\.canvas\\.(length|stableRead)$",
26+
"reason": "Canvas export randomization intentionally changes repeated data URL reads."
27+
},
28+
{
29+
"id": "window-screen-position-persona",
30+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.(0|22|[1-9][0-9]*)$",
31+
"reason": "The proxy applies the Windows Chrome persona and normalizes screen/window coordinates."
32+
},
33+
{
34+
"id": "navigator-app-version-persona",
35+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.5\\.0 \\((Macintosh; Intel Mac OS X 10_15_7|Windows NT 10\\.0; Win64; x64)\\) AppleWebKit/537\\.36 \\(KHTML, like Gecko\\) (HeadlessChrome|Chrome)/[0-9]+\\.0\\.0\\.0 Safari/537\\.36$",
36+
"reason": "Native Chromium exposes host platform appVersion while ZeroProxy exposes the Windows Chrome persona."
37+
},
38+
{
39+
"id": "navigator-user-agent-persona",
40+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.Mozilla/5\\.0 \\((Macintosh; Intel Mac OS X 10_15_7|Windows NT 10\\.0; Win64; x64)\\) AppleWebKit/537\\.36 \\(KHTML, like Gecko\\) (HeadlessChrome|Chrome)/[0-9]+\\.0\\.0\\.0 Safari/537\\.36$",
41+
"reason": "Native Chromium exposes host platform userAgent while ZeroProxy exposes the Windows Chrome persona."
42+
},
43+
{
44+
"id": "navigator-platform-persona",
45+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.(MacIntel|Win32)$",
46+
"reason": "Native Chromium exposes host platform while ZeroProxy exposes the Windows Chrome persona."
47+
},
48+
{
49+
"id": "initial-blank-document-url",
50+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.about:blank$",
51+
"reason": "The native clean iframe document starts at about:blank; ZeroProxy maps contained frame document URLs through virtual location facades."
52+
},
53+
{
54+
"id": "target-origin-bucket",
55+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.http://localhost:[0-9]+$",
56+
"reason": "Native exposes the target test origin while ZeroProxy exposes the proxy origin."
57+
},
58+
{
59+
"id": "target-document-url-bucket",
60+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.http://localhost:[0-9]+/differential-fixture$",
61+
"reason": "Native exposes the target fixture URL while ZeroProxy virtualizes frame document URL values."
62+
},
63+
{
64+
"id": "document-domain-bucket",
65+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.(localhost|proxy\\.localhost)$",
66+
"reason": "Native document.domain is the target host while ZeroProxy runs on the proxy host."
67+
},
68+
{
69+
"id": "opaque-proxy-origin-bucket",
70+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.null$",
71+
"reason": "Contained ZeroProxy frame origin can be opaque for protected about:blank/srcdoc boundary cases."
72+
},
73+
{
74+
"id": "document-cookie-presence",
75+
"pattern": "^surface\\.fingerprint\\.objectPropertyCollection\\.r\\.s$",
76+
"reason": "The raw oracle records document.cookie presence/type only; normalized comparison ignores cookie value exposure."
77+
}
78+
]
1279
}

0 commit comments

Comments
 (0)