Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix(stealth): inject stealth script and fix bot detection signals (#277)

pinchtabdev8bbc583c795b
diff --git a/internal/assets/stealth.js b/internal/assets/stealth.js
index cc20fb49..8227b4de 100644
--- a/internal/assets/stealth.js
+++ b/internal/assets/stealth.js
@@ -13,10 +13,30 @@ const seededRandom = (function() {
};
})();
-Object.defineProperty(navigator, 'webdriver', {
- get: () => undefined,
- configurable: true
-});
+// Webdriver evasion - hide the property completely
+(function() {
+ const proto = Object.getPrototypeOf(navigator);
+
+ // Delete from both instance and prototype
+ try { delete navigator.webdriver; } catch(e) {}
+ try { delete proto.webdriver; } catch(e) {}
+
+ // If we can't delete, make it return undefined and be non-enumerable
+ // so 'webdriver' in navigator returns false
+ const desc = {
+ get: () => undefined,
+ configurable: false,
+ enumerable: false // Hide from 'in' operator and Object.keys
+ };
+
+ // Only define if it still exists after deletion
+ if ('webdriver' in navigator) {
+ try { Object.defineProperty(navigator, 'webdriver', desc); } catch(e) {}
+ }
+ if ('webdriver' in proto) {
+ try { Object.defineProperty(proto, 'webdriver', desc); } catch(e) {}
+ }
+})();
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Array;
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Promise;
@@ -37,30 +57,72 @@ window.navigator.permissions.query = (parameters) => (
originalQuery(parameters)
);
-Object.defineProperty(navigator, 'plugins', {
- get: () => [{
- name: 'Chrome PDF Plugin',
- filename: 'internal-pdf-viewer',
- description: 'Portable Document Format'
- }, {
- name: 'Chrome PDF Viewer',
- filename: 'mhjfbmdgcfjbbpaeojofohoefgiehjai',
- description: ''
- }, {
- name: 'Native Client',
- filename: 'internal-nacl-plugin',
- description: ''
- }],
-});
+// Create a proper PluginArray-like object that passes instanceof checks
+(function() {
+ const fakePlugins = [
+ { name: 'Chrome PDF Plugin', filename: 'internal-pdf-viewer', description: 'Portable Document Format', length: 1 },
+ { name: 'Chrome PDF Viewer', filename: 'mhjfbmdgcfjbbpaeojofohoefgiehjai', description: '', length: 1 },
+ { name: 'Native Client', filename: 'internal-nacl-plugin', description: '', length: 1 }
+ ];
+
+ // Get the real PluginArray prototype from navigator.plugins
+ const realPluginsProto = Object.getPrototypeOf(navigator.plugins);
+
+ // Create array-like object with PluginArray prototype
+ const pluginArray = Object.create(realPluginsProto, {
+ length: { value: fakePlugins.length, writable: false, enumerable: true },
+ item: { value: function(i) { return this[i] || null; }, writable: false },
+ namedItem: { value: function(name) {
+ for (let i = 0; i < this.length; i++) {
+ if (this[i] && this[i].name === name) return this[i];
+ }
+ return null;
+ }, writable: false },
+ refresh: { value: function() {}, writable: false }
+ });
+
+ // Add indexed access
+ fakePlugins.forEach((p, i) => {
+ // Create Plugin-like object
+ const plugin = Object.create(Plugin.prototype, {
+ name: { value: p.name, writable: false, enumerable: true },
+ filename: { value: p.filename, writable: false, enumerable: true },
+ description: { value: p.description, writable: false, enumerable: true },
+ length: { value: p.length, writable: false, enumerable: true },
+ item: { value: function(i) { return null; }, writable: false },
+ namedItem: { value: function(n) { return null; }, writable: false }
+ });
+ Object.defineProperty(pluginArray, i, { value: plugin, writable: false, enumerable: true });
+ Object.defineProperty(pluginArray, p.name, { value: plugin, writable: false, enumerable: false });
+ });
+
+ Object.defineProperty(navigator, 'plugins', {
+ get: () => pluginArray,
+ configurable: true
+ });
+})();
Object.defineProperty(navigator, 'languages', {
get: () => ['en-US', 'en'],
});
-Object.defineProperty(navigator, 'platform', {
- get: () => 'MacIntel',
-});
+// Derive platform from user agent to avoid mismatch detection
+(function() {
+ const ua = navigator.userAgent || '';
+ let platform = 'Win32'; // default
+ if (ua.includes('Macintosh') || ua.includes('Mac OS X')) {
+ platform = 'MacIntel';
+ } else if (ua.includes('Linux')) {
+ platform = ua.includes('x86_64') || ua.includes('amd64') ? 'Linux x86_64' : 'Linux';
+ } else if (ua.includes('Windows')) {
+ platform = ua.includes('Win64') || ua.includes('WOW64') ? 'Win32' : 'Win32';
+ }
+ Object.defineProperty(navigator, 'platform', {
+ get: () => platform,
+ configurable: true
+ });
+})();
Object.defineProperty(navigator.connection || {}, 'rtt', {
get: () => 100,
diff --git a/internal/bridge/init.go b/internal/bridge/init.go
index 694e66e7..45b26df6 100644
--- a/internal/bridge/init.go
+++ b/internal/bridge/init.go
@@ -125,8 +125,10 @@ func setupAllocator(cfg *config.RuntimeConfig) (context.Context, context.CancelF
opts = append(opts, chromedp.Flag("enable-automation", false))
slog.Info("loading extensions", "paths", joined)
}
+ opts = append(opts, chromedp.Flag("enable-automation", false))
} else {
opts = append(opts, chromedp.Flag("disable-extensions", true))
+ opts = append(opts, chromedp.Flag("enable-automation", false))
}
// User Data Dir
@@ -380,7 +382,16 @@ func buildChromeArgs(cfg *config.RuntimeConfig, port int) []string {
}
func injectedScript(ctx context.Context, script string) error {
- return nil // Placeholder
+ // Use Page.addScriptToEvaluateOnNewDocument to inject the stealth script
+ // BEFORE any page JavaScript runs. This is critical for hiding automation
+ // signals like navigator.webdriver.
+ // Note: This is called from within chromedp.Run/ActionFunc, so we use
+ // direct CDP execution instead of nested chromedp.Run to avoid deadlocks.
+ return chromedp.FromContext(ctx).Target.Execute(ctx,
+ "Page.addScriptToEvaluateOnNewDocument",
+ map[string]interface{}{
+ "source": script,
+ }, nil)
}
func randomWindowSize() (int, int) {
diff --git a/tests/e2e/config/pinchtab-secure.json b/tests/e2e/config/pinchtab-secure.json
index a9f2d54f..1f2f6135 100644
--- a/tests/e2e/config/pinchtab-secure.json
+++ b/tests/e2e/config/pinchtab-secure.json
@@ -7,7 +7,8 @@
"extraFlags": "--no-sandbox --disable-dev-shm-usage"
},
"instanceDefaults": {
- "maxTabs": 2
+ "maxTabs": 2,
+ "stealthLevel": "full"
},
"multiInstance": {
"strategy": "always-on",
diff --git a/tests/e2e/config/pinchtab.json b/tests/e2e/config/pinchtab.json
index 5ac7755e..45f549bd 100644
--- a/tests/e2e/config/pinchtab.json
+++ b/tests/e2e/config/pinchtab.json
@@ -10,7 +10,8 @@
]
},
"instanceDefaults": {
- "maxTabs": 10
+ "maxTabs": 10,
+ "stealthLevel": "light"
},
"multiInstance": {
"strategy": "always-on",
diff --git a/tests/e2e/fixtures/bot-detect.html b/tests/e2e/fixtures/bot-detect.html
new file mode 100644
index 00000000..c9a91fc7
--- /dev/null
+++ b/tests/e2e/fixtures/bot-detect.html
@@ -0,0 +1,229 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Bot Detection Tests</title>
+ <style>
+ body { font-family: monospace; padding: 20px; background: #1a1a1a; color: #eee; }
+ .pass { color: #4caf50; }
+ .fail { color: #f44336; }
+ .warn { color: #ff9800; }
+ table { border-collapse: collapse; margin: 20px 0; width: 100%; }
+ td, th { border: 1px solid #444; padding: 8px; text-align: left; }
+ th { background: #333; }
+ h2 { color: #888; margin-top: 30px; }
+ </style>
+</head>
+<body>
+ <h1>πŸ€– Bot Detection Tests</h1>
+ <p>Comprehensive checks based on bot.sannysoft.com and other detection methods</p>
+
+ <h2>Critical Tests (must pass)</h2>
+ <table id="critical">
+ <tr><th>Test</th><th>Result</th><th>Value</th></tr>
+ </table>
+
+ <h2>Warning Tests (should pass)</h2>
+ <table id="warnings">
+ <tr><th>Test</th><th>Result</th><th>Value</th></tr>
+ </table>
+
+ <h2>Info</h2>
+ <table id="info">
+ <tr><th>Property</th><th>Value</th></tr>
+ </table>
+
+ <script>
+ const results = {};
+ const criticalTable = document.getElementById('critical');
+ const warnTable = document.getElementById('warnings');
+ const infoTable = document.getElementById('info');
+
+ function addResult(name, passed, value, severity = 'critical') {
+ results[name] = { passed, value, severity };
+ const table = severity === 'critical' ? criticalTable : warnTable;
+ const row = table.insertRow();
+ row.innerHTML = `
+ <td>${name}</td>
+ <td class="${passed ? 'pass' : (severity === 'warn' ? 'warn' : 'fail')}">${passed ? 'βœ“ PASS' : (severity === 'warn' ? '⚠ WARN' : 'βœ— FAIL')}</td>
+ <td>${String(value).substring(0, 100)}</td>
+ `;
+ }
+
+ function addInfo(name, value) {
+ const row = infoTable.insertRow();
+ row.innerHTML = `<td>${name}</td><td>${String(value).substring(0, 150)}</td>`;
+ }
+
+ // ═══════════════════════════════════════════════════════════════════
+ // CRITICAL TESTS - These MUST pass to avoid detection
+ // ═══════════════════════════════════════════════════════════════════
+
+ // Test: navigator.webdriver value (should be undefined/false, not true)
+ const webdriverValue = navigator.webdriver;
+ addResult('webdriver_value', webdriverValue === undefined || webdriverValue === false,
+ `navigator.webdriver = ${webdriverValue}`);
+
+ // Test: "webdriver" in navigator (property should not exist)
+ const webdriverExists = 'webdriver' in navigator;
+ addResult('webdriver_in_navigator', !webdriverExists,
+ `"webdriver" in navigator = ${webdriverExists}`);
+
+ // Test: Plugins instanceof PluginArray
+ const pluginsValid = navigator.plugins instanceof PluginArray;
+ addResult('plugins_instanceof', pluginsValid,
+ `navigator.plugins instanceof PluginArray = ${pluginsValid}`);
+
+ // Test: Plugins has items
+ const hasPlugins = navigator.plugins && navigator.plugins.length > 0;
+ addResult('plugins_present', hasPlugins,
+ `navigator.plugins.length = ${navigator.plugins?.length || 0}`);
+
+ // Test: chrome.runtime exists (Chrome extension API)
+ const chromeRuntime = !!(window.chrome && window.chrome.runtime);
+ addResult('chrome_runtime', chromeRuntime,
+ `window.chrome.runtime = ${chromeRuntime}`);
+
+ // Test: User agent not headless
+ const ua = navigator.userAgent;
+ const isHeadlessUA = ua.includes('HeadlessChrome') || ua.includes('Headless');
+ addResult('ua_not_headless', !isHeadlessUA,
+ isHeadlessUA ? 'Contains HeadlessChrome' : 'Normal Chrome UA');
+
+ // Test: Languages defined
+ const hasLanguages = navigator.languages && navigator.languages.length > 0;
+ addResult('languages', hasLanguages,
+ `navigator.languages = ${navigator.languages?.join(', ') || 'none'}`);
+
+ // Test: Permissions API exists and works
+ let permissionsOk = false;
+ try {
+ permissionsOk = navigator.permissions && typeof navigator.permissions.query === 'function';
+ } catch (e) {}
+ addResult('permissions_api', permissionsOk,
+ permissionsOk ? 'Available' : 'Broken/Missing');
+
+ // Test: CDP Runtime domain detection (automation leaves traces)
+ const hasCDPTraces = !!(window.cdc_adoQpoasnfa76pfcZLmcfl_Array ||
+ window.cdc_adoQpoasnfa76pfcZLmcfl_Promise ||
+ window.__webdriver_script_fn);
+ addResult('no_cdp_traces', !hasCDPTraces,
+ hasCDPTraces ? 'CDP traces found!' : 'Clean');
+
+ // ═══════════════════════════════════════════════════════════════════
+ // WARNING TESTS - Nice to pass, but not always critical
+ // ═══════════════════════════════════════════════════════════════════
+
+ // Test: Platform matches UA
+ const platform = navigator.platform;
+ let platformMatch = true;
+ if (ua.includes('Linux') && !platform.includes('Linux')) platformMatch = false;
+ if (ua.includes('Macintosh') && platform !== 'MacIntel') platformMatch = false;
+ if (ua.includes('Windows') && !platform.includes('Win')) platformMatch = false;
+ addResult('platform_ua_match', platformMatch,
+ `UA: ${ua.includes('Linux') ? 'Linux' : ua.includes('Mac') ? 'Mac' : 'Win'}, platform: ${platform}`, 'warn');
+
+ // Test: WebGL not SwiftShader (CPU renderer = headless)
+ let webglRenderer = 'unknown';
+ try {
+ const canvas = document.createElement('canvas');
+ const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
+ if (gl) {
+ const dbg = gl.getExtension('WEBGL_debug_renderer_info');
+ if (dbg) webglRenderer = gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL);
+ }
+ } catch (e) {}
+ const isSwiftShader = webglRenderer.toLowerCase().includes('swiftshader');
+ addResult('webgl_not_swiftshader', !isSwiftShader, webglRenderer, 'warn');
+
+ // Test: Outer dimensions exist (headless may have 0)
+ const hasOuterDims = window.outerWidth > 0 && window.outerHeight > 0;
+ addResult('outer_dimensions', hasOuterDims,
+ `${window.outerWidth}x${window.outerHeight}`, 'warn');
+
+ // Test: Hardware concurrency reasonable
+ const cores = navigator.hardwareConcurrency || 0;
+ const coresOk = cores >= 2 && cores <= 64;
+ addResult('hardware_concurrency', coresOk, `${cores} cores`, 'warn');
+
+ // Test: Device memory exists
+ const deviceMem = navigator.deviceMemory;
+ const hasDeviceMem = deviceMem && deviceMem > 0;
+ addResult('device_memory', hasDeviceMem, `${deviceMem || 0} GB`, 'warn');
+
+ // Test: Connection RTT exists
+ const rtt = navigator.connection?.rtt;
+ const hasRtt = rtt !== undefined && rtt > 0;
+ addResult('connection_rtt', hasRtt, `${rtt || 0} ms`, 'warn');
+
+ // Test: Screen dimensions reasonable
+ const screenOk = screen.width > 0 && screen.height > 0 && screen.colorDepth >= 24;
+ addResult('screen_dimensions', screenOk,
+ `${screen.width}x${screen.height} @ ${screen.colorDepth}bit`, 'warn');
+
+ // Test: Notification permission queryable (not denied by default)
+ let notifOk = true;
+ try {
+ // In automation, this might throw or return unexpected values
+ notifOk = Notification.permission !== undefined;
+ } catch (e) { notifOk = false; }
+ addResult('notification_api', notifOk,
+ `Notification.permission = ${Notification.permission}`, 'warn');
+
+ // Test: Function.toString not modified (automation tools sometimes wrap functions)
+ let toStringOk = true;
+ try {
+ const fnStr = Function.prototype.toString.call(navigator.permissions.query);
+ toStringOk = fnStr.includes('[native code]');
+ } catch (e) { toStringOk = false; }
+ addResult('function_tostring', toStringOk,
+ toStringOk ? 'Native' : 'Modified', 'warn');
+
+ // ═══════════════════════════════════════════════════════════════════
+ // INFO - Just for debugging
+ // ═══════════════════════════════════════════════════════════════════
+ addInfo('User Agent', navigator.userAgent);
+ addInfo('Platform', navigator.platform);
+ addInfo('Vendor', navigator.vendor);
+ addInfo('Languages', navigator.languages?.join(', '));
+ addInfo('Timezone', Intl.DateTimeFormat().resolvedOptions().timeZone);
+ addInfo('Screen', `${screen.width}x${screen.height} @ ${screen.colorDepth}bit`);
+ addInfo('Window Inner', `${window.innerWidth}x${window.innerHeight}`);
+ addInfo('Window Outer', `${window.outerWidth}x${window.outerHeight}`);
+ addInfo('Device Pixel Ratio', window.devicePixelRatio);
+ addInfo('Cookies Enabled', navigator.cookieEnabled);
+ addInfo('Do Not Track', navigator.doNotTrack);
+ addInfo('WebGL Renderer', webglRenderer);
+
+ // ═══════════════════════════════════════════════════════════════════
+ // SCORING
+ // ═══════════════════════════════════════════════════════════════════
+ window.__botDetectResults = results;
+
+ const criticalTests = Object.values(results).filter(r => r.severity === 'critical');
+ const warnTests = Object.values(results).filter(r => r.severity === 'warn');
+ const criticalPassed = criticalTests.filter(r => r.passed).length;
+ const warnPassed = warnTests.filter(r => r.passed).length;
+
+ window.__botDetectScore = {
+ critical: criticalPassed,
+ criticalTotal: criticalTests.length,
+ warnings: warnPassed,
+ warningsTotal: warnTests.length,
+ total: criticalPassed + warnPassed,
+ totalTests: criticalTests.length + warnTests.length,
+ passed: criticalPassed === criticalTests.length
+ };
+
+ // Summary
+ const summaryDiv = document.createElement('div');
+ summaryDiv.style.cssText = 'margin: 20px 0; padding: 20px; border-radius: 8px; font-size: 18px;';
+ summaryDiv.style.background = window.__botDetectScore.passed ? '#1b5e20' : '#b71c1c';
+ summaryDiv.innerHTML = `
+ <strong>${window.__botDetectScore.passed ? 'βœ“ PASSED' : 'βœ— FAILED'}</strong><br>
+ Critical: ${criticalPassed}/${criticalTests.length} |
+ Warnings: ${warnPassed}/${warnTests.length}
+ `;
+ document.body.insertBefore(summaryDiv, document.querySelector('h2'));
+ </script>
+</body>
+</html>
diff --git a/tests/e2e/scenarios-recent/45-bot-detection.sh b/tests/e2e/scenarios-recent/45-bot-detection.sh
new file mode 100755
index 00000000..4eb62a24
--- /dev/null
+++ b/tests/e2e/scenarios-recent/45-bot-detection.sh
@@ -0,0 +1,182 @@
+#!/bin/bash
+# 45-bot-detection.sh β€” Bot detection stealth tests
+# Tests the fixes for GitHub issue #275
+# Simulates checks from bot.sannysoft.com
+#
+# Tests run against:
+# - PINCHTAB_URL (light stealth) - basic bot detection evasion
+# - PINCHTAB_SECURE_URL (full stealth) - additional fingerprint protections
+
+source "$(dirname "$0")/common.sh"
+
+# ═══════════════════════════════════════════════════════════════════
+# LIGHT STEALTH MODE (main instance)
+# ═══════════════════════════════════════════════════════════════════
+
+echo -e "${BLUE}Testing LIGHT stealth mode (main instance)${NC}"
+
+# Navigate to bot detection fixture
+pt_post /navigate "{\"url\":\"${FIXTURES_URL}/bot-detect.html\"}"
+assert_ok "navigate to bot-detect fixture"
+sleep 1
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: navigator.webdriver is not true"
+
+# The critical test from issue #275: navigator.webdriver must NOT be true
+assert_eval_poll "navigator.webdriver !== true" "true" "navigator.webdriver is not true"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: navigator.webdriver is undefined"
+
+# Stricter check: should be undefined (best) or false
+assert_eval_poll "navigator.webdriver === undefined || navigator.webdriver === false" "true" "navigator.webdriver is undefined or false"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: webdriver property does not exist"
+
+# Key detection vector: 'webdriver' in navigator should be false
+assert_eval_poll "!('webdriver' in navigator)" "true" "webdriver property not in navigator"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: no CDP traces"
+
+# Check for Chrome DevTools Protocol traces left by automation
+assert_eval_poll "!(window.cdc_adoQpoasnfa76pfcZLmcfl_Array || window.cdc_adoQpoasnfa76pfcZLmcfl_Promise)" "true" "no CDP automation traces"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: UA not headless"
+
+# User agent should not contain HeadlessChrome
+assert_eval_poll "!navigator.userAgent.includes('HeadlessChrome')" "true" "UA not headless"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: plugins instanceof PluginArray"
+
+# Issue #275: navigator.plugins must pass instanceof PluginArray
+assert_eval_poll "navigator.plugins instanceof PluginArray" "true" "plugins passes instanceof PluginArray"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: plugins has length > 0"
+
+assert_eval_poll "navigator.plugins.length > 0" "true" "plugins has content"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: chrome.runtime present"
+
+assert_eval_poll "!!(window.chrome && window.chrome.runtime)" "true" "chrome.runtime exists"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: platform matches user agent"
+
+# Platform should match UA to avoid detection
+pt_post /evaluate '{"expression":"(() => { const ua = navigator.userAgent; const p = navigator.platform; if (ua.includes(\"Linux\") && !p.includes(\"Linux\")) return false; if (ua.includes(\"Macintosh\") && p !== \"MacIntel\") return false; if (ua.includes(\"Windows\") && !p.includes(\"Win\")) return false; return true; })()"}'
+assert_ok "platform matches UA"
+assert_json_equals "$RESULT" '.result.value' "true"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: languages are set"
+
+assert_eval_poll "navigator.languages && navigator.languages.length > 0" "true" "languages present"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: overall score passes"
+
+# Use the fixture's built-in scoring
+pt_post /evaluate '{"expression":"window.__botDetectScore && window.__botDetectScore.passed"}'
+assert_ok "get bot detect score"
+assert_json_equals "$RESULT" '.result.value' "true"
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect: all critical tests pass"
+
+pt_post /evaluate '{"expression":"window.__botDetectScore ? window.__botDetectScore.critical + \"/\" + window.__botDetectScore.criticalTotal : \"no score\""}'
+assert_ok "get critical score"
+SCORE=$(echo "$RESULT" | jq -r '.result.value')
+echo " Critical tests: $SCORE"
+
+# Extract numbers and verify all passed
+PASSED=$(echo "$SCORE" | cut -d'/' -f1)
+TOTAL=$(echo "$SCORE" | cut -d'/' -f2)
+if [ "$PASSED" != "$TOTAL" ]; then
+ fail_test "Not all critical tests passed: $SCORE"
+fi
+
+end_test
+
+# ═══════════════════════════════════════════════════════════════════
+# FULL STEALTH MODE (secure instance)
+# NOTE: Secure instance has allowEvaluate=false for security tests,
+# so we can only test navigation, not JavaScript evaluation.
+# The stealth fixes (enable-automation=false) apply to ALL instances.
+# ═══════════════════════════════════════════════════════════════════
+
+echo ""
+echo -e "${BLUE}Testing FULL stealth mode (secure instance - limited tests)${NC}"
+echo -e "${YELLOW}Note: evaluate disabled on secure instance, testing navigation only${NC}"
+
+# Switch to secure instance for full stealth tests
+ORIG_URL="$PINCHTAB_URL"
+PINCHTAB_URL="$PINCHTAB_SECURE_URL"
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect-full: can navigate with full stealth"
+
+# Navigate to bot detection fixture on secure instance
+pt_post /navigate "{\"url\":\"${FIXTURES_URL}/bot-detect.html\"}"
+assert_ok "navigate to bot-detect fixture (full stealth)"
+
+# Verify we got a valid response with tab info
+TAB_ID=$(echo "$RESULT" | jq -r '.tabId // empty')
+if [ -n "$TAB_ID" ]; then
+ echo -e " ${GREEN}βœ“${NC} Got tabId: $TAB_ID"
+ ((ASSERTIONS_PASSED++)) || true
+else
+ fail_test "No tabId in response"
+fi
+
+end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "bot-detect-full: page title loaded correctly"
+
+TITLE=$(echo "$RESULT" | jq -r '.title // empty')
+if [ "$TITLE" = "Bot Detection Tests" ]; then
+ echo -e " ${GREEN}βœ“${NC} Page title: $TITLE"
+ ((ASSERTIONS_PASSED++)) || true
+else
+ echo -e " ${YELLOW}⚠${NC} Unexpected title: $TITLE"
+fi
+
+end_test
+
+# Restore original URL
+PINCHTAB_URL="$ORIG_URL"
+
+# ═══════════════════════════════════════════════════════════════════
+# Note: Full stealth JavaScript tests (WebGL spoofing, etc.) would
+# require allowEvaluate=true. The key stealth fix (enable-automation=false)
+# is verified in the light mode tests above.
+# ═══════════════════════════════════════════════════════════════════