| # Content Browser DevTools Security | |
| `//content/browser/devtools/` (along with `content::DevToolsAgentHostClient` in `//content/public/browser/`) implements the unsandboxed Browser-process Chrome DevTools Protocol (CDP) target, session, and domain host. It defends against compromised web and worker renderers and inherits [Content Security Guidance](/content/SECURITY.md), the [CDP Security Framework](/third_party/blink/public/devtools_protocol/SECURITY.md), and [Security for Agents](/docs/security/security-for-agents.md). | |
| ## Security Boundaries | |
| * **Client trust and capability enforcement:** Untrusted CDP clients (such as `chrome.debugger` extensions) cannot attach to the browser-wide target, receive only allowlisted domains, and remain gated across attachment, navigations, and domain commands by `DevToolsAgentHostClient` target-URL, frame, local-file, navigation-initiator, and unsafe-operation capability checks, preserving `StoragePartition` and `BrowserContext` isolation. | |
| * **Compromised-renderer message and child-target validation:** Copies renderer-supplied shared-memory protocol payloads into browser-owned memory before framing, `sessionId`, and notification-`id` validation, validates child-target registrations and URLs, and terminates renderers sending inconsistent protocol or target messages. | |
| ## Local Non-Bugs | |
| * **Trusted-client target control, self-reported telemetry, and base-class defaults:** Target inspection and mutation within the attached `StoragePartition` (including scoped raw-header access while attached) by trusted CDP clients; a compromised renderer spoofing its own target's telemetry or causing clean OOM/hangs in `devtools://` without memory corruption or session smuggling; and permissive virtual defaults on base `DevToolsAgentHostClient` intended for trusted in-process callers. |