1. HIGH — Function.toString Map exfiltration:
Replaced Map with WeakMap + bound methods. A malicious page could
monkeypatch Map.prototype.has to capture the override store, then
use it to cloak malicious functions as [native code]. WeakMap with
pre-bound has/get methods prevents this side-channel.
2. MEDIUM — Static GPU fingerprint:
Default GPU renderer now randomly selects from 5 common Apple chip
variants (M1, M1 Pro, M1 Max, M2, M3) per session. Prevents sites
from building a static GStack-specific fingerprint signature.
3. Tests updated: 54 total (35 unit + 19 e2e), 0 failures.
Added tests for WeakMap usage and GPU randomization.
Add stealth.ts module that addresses all known automation fingerprints:
1. navigator.webdriver property deletion (not just value override) -
bot detectors check property existence via 'webdriver' in navigator
2. WebGL renderer spoofing (SwiftShader → Apple M1 Pro) - SwiftShader
is the #1 giveaway of container/headless environments
3. Proper PluginArray that passes instanceof checks - raw arrays fail
PluginArray instanceof which DataDome/Cloudflare check
4. Complete chrome object (app, runtime, loadTimes, csi) - shallow
stubs missing chrome.app get flagged
5. CDP runtime artifact cleanup (cdc_*, $cdc_*, __webdriver*)
6. Permissions API normalization (prompt, not denied)
7. Media devices presence for containers
8. Function.toString() protection - overridden functions look native
Passes SannySoft (bot.sannysoft.com) 100%. Replaces inline patches in
browser-manager.ts with shared module used by both headless launch()
and headed launchHeaded() paths.
Tested against: NYT, LinkedIn, Google, Bloomberg, BleepingComputer,
Brave Search, DuckDuckGo - all previously blocked from automation
browsers, all now pass through.
Remaining hard targets (Reddit, FT, WSJ) blocked by IP reputation
checks beyond browser fingerprinting.