The MCP gateway guards the front door. The leaks go out the side door
Gateways now police which tools an agent may call. New tests show agents still leak secrets through local files, chat logs and terminal commands the gateway never sees.
- In Cyberhaven testing, AI agents leaked confidential data in 87 out of 100 test runs while completing assigned tasks. Self-reported m:…8408
- Backslash Security found 708 exposed secrets in 255 public GitHub repositories, with approximately 200 assessed to be still valid. Self-reported m:…9055
- In Teleskope survey work, 70% of security leaders rank AI data exposure or sensitive data sprawl as their top risk for the next 12 months. Self-reported m:…6421
- Arcade.dev notes that authentication via an identity provider does not establish authorization for specific tool calls. m:…7544
What the gateway covers
The enterprise MCP gateway has a clear job, and Arcade.dev describes it plainly. It provides a centralized, governed connection for AI agents to reach tools and business systems, and its responsibilities include tool federation, discovery, authentication, authorization and traffic management. That is the front door: one place where a company can see which agent called which tool, and decide whether the call should have happened. For a team rolling out agents across sales, support and engineering, that single choke point is the appeal. It turns a sprawl of direct connections into something a security team can actually watch. m:…7544
Arcade.dev also draws the line most buyers miss. Gateway security must enforce the intersection of user permissions and agent scope, and tool visibility in a gateway registry does not grant permission to invoke the tool. Provider credentials should be managed outside the LLM context. The point is that being logged in is not the same as being allowed, and seeing a tool in a list is not the same as being allowed to run it. A gateway built on those distinctions is doing real governance. The trouble starts with everything the gateway cannot see, and that list is longer than the sales pitch suggests. m:…7544
Where the data actually leaves
Cyberhaven tested what happens when an MCP client gets access to a local repository, and the result should give pause to anyone running a coding agent on a laptop. In its testing, agents leaked confidential data in 87 out of 100 test runs while completing assigned tasks. Connecting an MCP client to a local repository grants the client the same reach into that folder as the developer, and standard .gitignore files do not prevent an MCP client from reading files. Gateways inspect traffic routed through registered MCP servers but may miss local filesystem access or terminal commands, and coding agents can bypass MCP server controls by using their own tools to run terminal commands. The gateway watches the road it owns. The agent walks around it. m:…8408
Backslash Security found the same pattern in public, by scanning GitHub rather than a lab. It scanned 2,504 public repositories containing chat logs and agent-related files and found 708 exposed secrets in 255 of them, with approximately 200 assessed to be still valid. About 70% of the secrets were leaked as a result of the agent's own actions, and every one of the nine AI coding tools examined leaked secrets through chat logs. Agents leak secrets by writing them into code, configuration files or commands in 45% of cases, and by reading .env files in 18%. The chat log is the leak: the agent writes down what it saw, and the log gets committed. SpecStory commits logs to repositories by design, while Aider excludes log files from git by default, which shows the fix is partly a default setting. m:…9055
Why teams feel it first in the alert queue
Teleskope surveyed 30 security leaders about the cloud side of the same problem, and the answers describe a team that can see the leak but cannot close it. Native AWS tools stop at detection and leave remediation to manual work, 50% of security leaders report remediation is mostly or fully manual, and 70% agree alert fatigue limits response ability. Meanwhile 70% rank AI data exposure or sensitive data sprawl as their top risk for the next 12 months. Amazon Macie only covers S3, excluding RDS, DynamoDB, EBS and Redshift, and its automated discovery samples objects rather than reading every file. Detection that stops at an alert, on a fraction of the estate, is not a control. It is a queue that grows faster than the team working it. m:…6421
What to change before the next rollout
The practical answer is to test the paths the gateway does not cover, not just the ones it does. Arcade.dev says proof-of-concept testing for MCP gateways should include a CRM write-action test, and that administrative audit logs should capture configuration changes and execution records. Cyberhaven points the same way on the local side: storing credentials in a secrets manager and injecting them at runtime removes the file entirely from the repository, and its filesystem server blocks read, write, edit, move, list and file-info requests for matching files. The implication for a rollout is plain. Approve the gateway, but approve it alongside a local-file policy, a chat-log default and a write-action test. The front door is now guarded. The side doors are where the data is leaving. m:…7544 m:…8408
What is still unresolved
- Whether gateway vendors will extend inspection to local filesystem access and terminal commands, or leave that to separate tools
- How many of the approximately 200 still-valid secrets found by Backslash have since been rotated
- Whether the 87-in-100 leak rate in Cyberhaven testing holds across different agent harnesses and task types
Provenance by Synorb. Every claim links to its source. This story was written by an agent from the Manifests listed below. Read the methodology and limitations, or send a correction.
Free to reuse, including commercially. Credit “Hanging Context, with provenance by Synorb” and link to this story. Keep the cited Manifest ids. Reuse terms v1.