On this page
Shadow AI Agents Already in Your Codebase: Detect and Block
tl;dr
Shadow AI agents are already writing unreviewed code into production from developer endpoints. Network firewalls and CASB tools cannot see the local write path where agents modify repositories, so endpoint detection is required before agents merge pull requests.
A June 2026 survey of 400 IT and cybersecurity professionals found that 46% of organizations had an employee connect an unauthorized AI tool directly to corporate systems, and 20.1% experienced a resulting security incident DNSFilter survey. The same research shows 81% of organizations have a formal AI tool policy, yet 43% let employees grant OAuth or API access to corporate systems themselves DNSFilter survey. Policy exists. Enforcement doesn’t. And the agents are already writing code.
What’s the real scale of shadow AI in engineering teams?
AI adoption has reached 98% across organizations, yet 40% of leaders use AI tools their organization never formally approved Aptean research. The DNSFilter survey puts it more bluntly: 99.75% of respondents say someone in their organization uses AI tools at work, and 55% run three to five of them DNSFilter survey. Nudge Security’s discovery data indicates more than 1,000 new AI tools have entered the market in the past two years, outpacing static tool lists and manual reviews Nudge Security data.
This isn’t about employees pasting text into ChatGPT anymore. The primary shadow AI risk has shifted to AI coding agents writing unreviewed code, skills, and MCP connections into production from developer endpoints, outside AI gateways and network controls Zscaler analysis. Block’s Builderbot executes over 200,000 operations per day and merges approximately 1,500 pull requests per week — about 15% of all production code changes — with 100% of Block engineers regularly using AI Block announcement. When agents operate at that velocity, human review capacity becomes the bottleneck.
The governance gap is widening. EU AI Act high-risk provisions are now in force as of 2026, increasing the gap between deployed AI and what organizations can prove to auditors Superblocks analysis. Meanwhile, 37.75% of organizations report unreported security incidents, and 43.5% say incidents were downplayed DNSFilter survey. AI agents uploaded 13,000+ internal screenshots to public repositories without security teams noticing Glow Security findings.
Why are traditional security controls missing AI coding agents?
Network firewalls and CASB tools see traffic to AI endpoints. They cannot tell you which repository the prompt came from, what source code went out with it, or what generated code came back and got committed under a human name Cycode analysis. The write path — where AI agents actually modify production codebases — is invisible to network-layer controls.
This is what I call the Write-Path Blind Spot: AI coding agents now write directly into production from unmanaged developer endpoints, and security controls built for network traffic and app review cannot see or stop the local write path. MCP (Model Context Protocol) servers — the connectors that enable agents to interact with databases, Jira, Slack, and other systems — are a layer most security platforms don’t monitor at all AgileBlue announcement.
JFrog’s 2026 Software Supply Chain Security State of the Union report identified 969 malicious AI agent skills carrying high-impact payloads and 495 malicious AI models on Hugging Face JFrog report. Existing AppSec tools were built to catch vulnerable code. Agent skills, plugins, and APM packages ship something different: plain-English instructions that an agent reads and acts on JFrog report.
How do AI agents bypass security on developer endpoints?
Researchers at Forever Security demonstrated that a malicious AGENTS.md file in a developer’s Downloads folder can hijack OpenAI Codex and Claude Code to install rogue npm packages and leak OAuth tokens, because agents automatically load instruction files from their working directory Forever Security research. “There is nothing here for OpenAI or Anthropic to patch. An agent that follows the AGENTS.md in its folder is doing exactly what it was built to do,” the researchers noted Forever Security research.
Symantec tracked an unauthorized AI relay service active since early 2026 that installed genuine OpenAI Codex and Claude Code CLIs at a dozen organizations across mainland China, South Korea, Taiwan, and Malaysia, while disabling the CLIs’ execution sandbox security feature Symantec report. The relay service reconfigured the tools to route requests through its own infrastructure rather than OpenAI’s or Anthropic’s networks, turning off the sandbox that limits what the AI coding tools can do Symantec report.
ZIP files shared between co-workers containing new agent skills, locally-developed MCP servers passed between developers, and locally stored newly-minted agents all bypass standard security checks JFrog blog. These assets completely bypass the managed path where code gets scanned and vetted, creating a local path with no gates and no reviews JFrog blog.
What detection approaches actually work for shadow AI agents?
You need visibility at three layers: the endpoint where agents run, the repository where code lands, and the network where traffic flows. No single tool covers all three well.
| Tool | Detection Layer | Key Capability | Gap |
|---|---|---|---|
| AgileBlue Phase 2 | Endpoint | Detects Copilot, Cody, Tabnine, browser extensions, AI files, unauthorized MCP connections with user/process attribution; spots MCP servers within 15 minutes AgileBlue | No repository-level code scanning |
| JFrog AI Security | Endpoint + Repository | Local Shadow AI detection on workstations; scans models, skills, plugins, APM packages with BYOK; enforces policy via Agent Guard JFrog | Requires JFrog platform adoption |
| GitHub Code Scanning for AI | Repository | Public preview; scans PRs for indirect prompt injection, sensitive info disclosure, excessive agency; requires GitHub Advanced Security GitHub | Not available on GitHub Enterprise Server |
| Codacy AI Inventory | Repository | Repository-level observability detecting active AI coding assistants/agents across repos; enterprise-tier only Codacy | No free tier; no endpoint visibility |
| Zscaler AI Protect | Network/SASE | Visibility across 2,900+ AI apps; public cloud agent scanning; source code and runtime scanning Zscaler | Limited endpoint agent visibility |
Endpoint monitoring is the only layer that can detect shadow AI agents related analysis. Network and identity tools miss most agentic traffic, leaving enterprises blind. AgileBlue’s Phase 2 and JFrog’s local detection both address this by running on developer workstations where the agents actually execute. Repository scanning catches what endpoints miss — GitHub’s new code scanning for AI applications automatically flags indirect prompt injection, sensitive information disclosure, and excessive agency in pull requests GitHub. But it requires GitHub Advanced Security and doesn’t run on Enterprise Server.
The shadow AI detection guide covers this layered approach in more depth: employees use unapproved AI tools without employer disclosure, but most detection tools only track network-level usage and miss high-risk prompt-layer data exfiltration events.
How should you govern AI agents before they write to production?
Detection without prevention is just incident reporting with better timestamps. The governance gap between policy and enforcement is where incidents happen: 73.9% of executives believe new AI tools require admin approval, while only 58-60% of practitioners say that approval actually happens DNSFilter survey, as outlined in the AI coding tool governance checklist.
Pre-execution controls are the answer. TrueFoundry’s approach governs model access, agent actions, and MCP tool calls before they execute Nudge Security comparison. Pillar Security blocks risky actions by coding agents such as Claude Code, Codex CLI, and Cursor before they run Pillar Security analysis. JFrog’s Agent Guard enforces policy at the point an agent reaches for any skill, model, or MCP server JFrog report.
For compliance, the EU AI Act shadow AI analysis notes that shadow AI compliance requires discovery before documentation. Security platforms detect traffic but miss undeclared tools, while governance suites only record what employees declare. Unified detection and governance closes the visibility gap that regulators now enforce.
What’s your next move for shadow AI governance?
Start with endpoint visibility — you cannot govern what you cannot see on the machines where agents actually run. Deploy AgileBlue or JFrog’s local detection to inventory AI coding assistants, browser extensions, MCP servers, and agent skills on developer workstations. Layer repository scanning (GitHub Code Scanning for AI or Codacy AI Inventory) to catch what endpoints miss in pull requests. Then enforce pre-execution policy at the write path: block unauthorized MCP connections, require approval for new agent skills, and gate agent actions that touch production systems.
The agents are already in your codebase. The question is whether you’ll see the next pull request they write before it merges.
Recommended Reading
-
Finding and Eliminating Shadow AI Without Slowing Developers
Endpoint agents are required to catch shadow AI in engineering organizations. Network and browser tools miss CLI, IDE, and MCP traffic where sensitive code and credentials actually flow.
-
Shadow AI Governance: 2026 Checklist to Detect and Block
Endpoint-native visibility and enforcement is the only reliable way to detect and block shadow AI before incidents occur. Blocking alone pushes developers to untracked tools, so teams need a paved road with approved models and real-time guardrails.
-
Best MCP Tools and Platforms for AI Agents
The 2026 MCP tool market has a 604x price spread and opaque billing models that make sticker prices meaningless for agentic workloads. Per-seat pricing is the worst fit for scaling agents, while unaddressed security gaps block most enterprise adoption. This guide breaks down top MCP platforms, hidden costs, and key evaluation criteria to pick the right tool for your use case.