桌面端屏蔽 Anthropic 警告,并暴露 11 款浏览器的 Cookie
3c72b4e7 已确认:T3 屏蔽 Claude 的审批影子警告,让 uploadFiles 绕过 Codex 沙盒,并在桌面端关闭浏览器隔离。
独立代码审计(3c72b4e7)<ClaudeAdapterV2.ts · ServerBrowser.ts · BrowserImport>
发送至:桌面端及 Agent 运行时用户
2026 年 11 月 27 日
对 main 分支提交 3c72b4e7 的源码检查记录了三种相互影响的浏览器与审批绕过行为:
- **Anthropic 安全警告被静音(
ClaudeAdapterV2.ts#L1629-L1647):** 在permissionMode: default(受监督模式)下注入通配符mcp__t3-code__*;跳过preview_*工具的runtimeMode检查;在withoutClaudeCanUseToolShadowedWarning内动态修改process.emitWarning,将CLAUDE_SDK_CAN_USE_TOOL_SHADOWED当作“单会话噪声”丢弃。 - **Codex 沙盒被绕过(
ServerBrowser.ts#L1723-L1749):**enableAgentBrowserAccess默认设为true(settings.ts#L1445)。宿主浏览器操作在 Codex 沙盒外执行(CodexAdapterV2.ts#L853-L883);uploadFiles只检查NodePath.isAbsolute(path),既不限制在工作区内,也不要求用户确认。 - **桌面端未隔离 11 款浏览器的 Cookie(
ServerBrowser.ts#L1236-L1247):** 只有在desktop === null(无头 Linux)时,isolatedContext才为true。桌面 Electron 是唯一运行BrowserImport/(Sources.ts、ChromiumKeys.ts)的目标,它会从 11 款浏览器导入 Keychain、DPAPI 及完全磁盘访问权限下的 Cookie;但此时isolatedContext为false,open=false会让会话保持隐藏,preview_evaluate则可在任意 URL 上通过 CDP 执行Runtime.evaluate(每次 64 KB)。


