Est.

Why CASB-Era Shadow SaaS Playbooks Break on Coding Assistants and Agent Traffic

CASBs can't see agents, so security teams need new signals.

· 9 min read
Cover illustration for “Why CASB-Era Shadow SaaS Playbooks Break on Coding Assistants and Agent Traffic”
Enterprise AI Governance · November 30, 2026 · 9 min read · 1,917 words

Detecting shadow AI requires more than a catalog of blocked domains. Enterprise security teams need to combine network, endpoint, identity, and integration signals, then govern agents through attributable identities and enforcement on each tool call. CASB-era playbooks break because coding assistants and agents invalidate their three foundations at once, namely recognizable applications, inspectable traffic paths, and threats defined by where data is stored.

What CASB was actually built to do and the three assumptions it rests on

A cloud access security broker, or CASB, lets security teams see which cloud applications are in use and apply policy to them. Its catalog maps a domain such as api.salesforce.com to Salesforce, assigns a risk score, and gives policy an identifiable target. The domain stands in for the application. For governed SaaS adoption, that was a useful simplification.

The model also assumes risky traffic crosses a perimeter where it can be intercepted or inspected. Employees use browsers on managed devices on corporate networks, giving the broker a place to stand. Finally, the model treats the central threat as data stored in the wrong place. When an employee moves a file to Dropbox, the questions concern residency and access control, rather than what an autonomous system might do with its contents. These were reasonable foundations, but coding assistants and agents invalidate all three.

Why the same domain can now mean a sanctioned deployment, a personal experiment, and a leaking extension simultaneously

The same api.openai.com endpoint can serve a sanctioned enterprise deployment, a developer’s personal account, and a browser extension that leaks data. A domain catalog sees one application and assigns one risk score. The risks are not remotely the same. The endpoint identifies the service receiving a request, but not the organizational approval or use case behind it. That distinction is precisely what security policy needs.

As a result, a domain-keyed rule can block a sanctioned deployment or pass a leaking extension, depending on which traffic triggers it. A longer catalog cannot distinguish three uses that already share an entry.

Catalog lag adds a separate problem. New model endpoints, wrapper services, and niche AI tools appear faster than vendors can add them to their catalogs, so unsanctioned use can go on between when a tool is deployed and when it is classified. Traditional shadow IT chiefly put data somewhere it should not be. Shadow AI can process, analyze, and act on that data, so identifying the destination is only the beginning of understanding the risk.

How coding assistants route around the proxiable perimeter before the CASB ever sees a packet

A coding assistant can send code context from inside the IDE over pinned TLS. Certificate pinning prevents proxy inspection for many native applications and CLI tools, leaving the CASB with a TLS handshake. The connection exists, but its contents remain opaque. Limits set by privacy law and broad exemptions from inspection give AI traffic more ways to pass without being fully inspected.

Other activity avoids the corporate proxy path altogether. Personal accounts used on personal devices over home networks or mobile connections do not touch that path. Tenant restrictions help with a handful of major providers, but do not cover the long tail. Browser extensions present a different disguise, reading page content and form inputs locally before sending them through their own backend. To the network, the resulting HTTPS connection to a CDN can disguise AI use as routine “technology” traffic.

Agents extend this problem beyond individual devices. They call APIs programmatically from local processes or backend infrastructure, outside the browser proxies through which CASBs govern SaaS traffic. There may be nothing there to inspect. Better proxy coverage can help teams see more of the traffic that crosses the proxy, but browser interception cannot govern activity that does not use browsers.

Why the OAuth grant problem removes an entire class of AI traffic from CASB visibility by design

An employee can authorize an AI tool to access corporate data through an OAuth grant. The vendor’s servers then communicate directly with Microsoft’s or Google’s APIs using a persistent token, rather than routing the delegated access through the employee’s proxy. CASB enforcement has no insertion point in that exchange. The authorization mechanism is working as designed. Changing an inspection rule does not repair the gap.

The CASB sees approved traffic to an approved application while AI processing and onward forwarding stay invisible. Built-in features such as Notion AI, Slack AI, and Salesforce Einstein leave a similar blind spot. The application is already on the allowlist. Inspection that stops at its boundary does not reveal which sub-processor receives data from the AI feature.

Persistence makes delegated access harder to contain. Logging out does not remove the OAuth grant, and a grant can remain after the sponsoring employee leaves the company. An agent may keep access to repositories, email threads, and shared drives for weeks or months. Each unsanctioned tool also adds credentials that are missing from the asset inventory, including OAuth tokens, API keys, and session credentials.

This breaks the stored-data assumption as well as the perimeter assumption. Data need not move into a new storage application to be exposed to an external model. It can instead be read, summarized, and potentially retained through access that appears to belong to normal sanctioned-app activity.

How MCP extends the same structural gaps to agent-to-system connections at scale

MCP has become the main integration layer that agents use to connect to enterprise systems. Rather than introducing another application for the catalog, it makes the connections between agents and tools difficult to see. Agents call MCP servers programmatically from backend infrastructure, outside browser proxies. The blind spot becomes part of the integration architecture.

Shadow MCP adds an inventory problem to that architecture. Engineers deploy servers without formal review and connect them to production GitHub repositories, internal databases, and APIs. Legacy security tools may never see those connections, even as they give access to important systems. The inventory is already behind the deployment.

The signals that do exist can remain disconnected. When a developer authenticates to an unsanctioned AI service, it can create an identity event, a network event, and a potential data loss event in three separate tool domains. Without correlation, none describes the whole interaction. The NSA’s May 2026 Cybersecurity Information Sheet also flagged that authorization and credential isolation were not yet standardized at the protocol level, leaving individual gateways to build server-side secrets management. MCP therefore amplifies the earlier gaps through a common programmatic integration layer, while leaving essential security responsibilities to its implementors.

Why prompt injection and runaway agent sessions are threats the CASB threat model was never conceived to address

The CASB threat model watches users moving data, leaving instructions hidden inside tool call responses outside its scope. An agent can be redirected by malicious content in material it reads, without a user choosing the resulting action. The input becomes an instruction channel. A legitimate task can therefore turn into an unauthorized sequence while the user does nothing further.

Named vulnerabilities make this more than a hypothetical distinction. CVE-2025-32711, known as EchoLeak, demonstrated zero-click data exfiltration from M365 through Copilot without user interaction. Anthropic’s official Git MCP server shipped with exploitable injection CVEs, while Cursor IDE had code execution through injection in CVE-2025-54135.

The GitHub MCP incident shows the sequence clearly. An attacker hid prompt injection instructions in an issue they crafted in a public repository. When a Claude agent using the GitHub MCP server read the malicious content, the instructions redirected it to access tokens from a separate private repository and exfiltrate them through a subsequent tool call.

The MCP specification defines client-server transport but leaves consent and tool safety enforcement to implementors. A server that implicitly trusts the agent’s tool calls can execute a destructive call without questioning its origin. The IETF’s June 2026 Internet-Draft describes “protocol pivoting” across MCP and Agent-to-Agent delegation, warning that isolated protocol mitigations do not address movement across their boundaries. Runaway sessions can make this risk unfold faster and last longer, so gateways need to enforce rate limits and reauthorization thresholds that CASB architecture does not provide.

How can security teams detect unauthorized AI usage when the perimeter and catalog are not enough?

Diagram: Five Detection Sources, Each Covering a Different Slice. Visualizes: Security teams need at least five parallel data sources to detect unauthorized AI usage, because no single source covers all exposure vectors.

Detection requires at least five data sources working in parallel, including CASB visibility, DNS log analysis, EDR, expense data review, and email integration scanning. Each exposes a different slice of activity. None simultaneously covers personal devices, free-tier accounts, managed endpoints, OAuth grants, and API-layer agent traffic. CASB remains useful for what it can see, but it cannot serve as the complete inventory.

Correlation is as important as collection. Identity, network, and potential data loss events need to be joined so that authentication to an unsanctioned service does not remain separate from its data consequences. Continuous tracking is also distinct from a discovery scan, because the AI tool inventory changes weekly and must be treated as partially stale. Last quarter’s scan is not a current control.

That tracking needs to cover three layers. The first layer tracks tools in use, including chatbots, copilots, coding assistants, embedded SaaS features, and agents. The second is what data moves, with prompt content, uploaded files, and pasted context mapped against data classification. The third is how models behave in the environment, including endpoint calls, OAuth grants, and agents’ standing permissions.

OpenTelemetry provides a structured instrumentation layer for agent activity. Its v1.39 MCP semantic conventions define mcp.client and mcp.server metrics and mcp.* span attributes, including four session and operation duration metrics. The attributes include the method name, session ID, and protocol version. These give teams a way to emit and correlate tool call data in existing observability stacks, addressing activity that a browser traffic log cannot describe.

What a governance model built for agent-era traffic looks like, starting from identity rather than the perimeter

The governance response is to anchor controls in identity and the protocol layer. Every agent needs a persistent, attributable identity, every tool call must pass through an enforcement point, and every action must emit a structured audit event. Shared service accounts do not provide that accountability. An agent’s identity should connect to the existing identity provider, while its credentials should be short-lived and task-scoped so that it never holds raw secrets.

That identity also needs an explicit lifecycle. Agents should have owners, policies, credentials, and lifecycle states, with grants revoked when the sponsoring user leaves and permissions expiring when the task ends. Otherwise, employee offboarding stays separate from the process for ending agent access. OAuth persistence makes that separation dangerous.

Before enforcement can cover the environment, shadow MCP discovery must bring unreviewed servers into the inventory and governed registry. The governance pattern across 2026 reference architectures includes registered agent and server identities, a signed registry, and gateway authorization whose granularity matches the risk tier. Structured audit logs go to the existing SIEM, with egress filtering and a tested kill switch also in place. Policy must apply to every prompt and tool call, with prompt injection defenses and argument inspection, because teams cannot assume a server will check where an instruction came from.

The governed route also has to be usable. Blocking alone fails when employees keep using personal AI accounts because the approved path is slower than the workaround. The response is to make the governed path faster, while extending the identity provider, SIEM, observability stack, and network controls already in place. A signed registry tied to persistent identities gives policy a target it can rely on even when domains and browser traffic no longer do.

More in Enterprise AI Governance