Shadow AI Security: How to Find and Secure Unapproved AI in Development
Shadow AI security starts with discovery. See where unapproved AI tools, keys, and MCP servers enter development, and how to inventory and govern them.

Table of contents
- Key takeaways about shadow AI security
- What Is Shadow AI and Why Is It Growing?
- Where Shadow AI Enters the Software Development Lifecycle
- The Biggest Security Risks of Shadow AI
- How AI Coding Tools, Agents, and MCPs Create Hidden Risk
- How to Discover Shadow AI Across Development Environments
- Building Governance and Guardrails Without Slowing Developers
- How Legit Security Helps Identify and Govern Shadow AI Risk
- FAQs about shadow AI security
Shadow AI Security: How to Find and Secure Unapproved AI in Development
Many security teams now have an AI policy, but far fewer can produce a reliable inventory of the AI tools actually running in development. Shadow AI security is the work of closing that gap: finding the assistants, models, agents, skills, and keys already inside, then deciding what stays.
Shadow AI security is the practice of finding and governing the AI tools, models, agents, skills, and API keys that entered your development environment without review. The hard part is discovery, not policy: unapproved AI often arrives as an IDE extension, a personal model-provider key, or an MCP server configuration, bypassing traditional procurement and review processes.
Key takeaways
- Shadow AI security is an inventory problem before it's a policy problem. Rules can't reach a component that no system in the enforcement path has ever recorded.
- Unapproved AI leaves traces in six systems security already owns: endpoints, source control, dependency manifests, secret stores, egress logs, and OAuth grants.
- An unowned model-provider key is the fastest signal available, naming a paid channel, a spending limit, and roughly which applications call it.
- Bans can relocate usage rather than eliminate it, pushing some activity toward personal accounts, unmanaged devices, or alternative providers.
- Inventories without named owners decay, so route every finding to a person on the team that introduced it and re-run discovery on a fixed schedule.
What Is Shadow AI and Why Is It Growing?
The common misconception is that a policy or a blocked domain means you don't have shadow AI, when in practice the ban only relocated it. Blocking a vendor domain moves the same traffic to a personal account on an unmanaged laptop, and the code still leaves. So what is shadow AI in a development context? The shadow AI definition worth working from is narrow: any AI tool, model, agent, skill, or credential in use without review, an approval record, or a named owner.
Growth follows adoption velocity, not permissiveness. Gartner's May 2025 report "Why Vibe Coding Needs to Be Taken Seriously" predicts that by 2028, 40% of new enterprise production software will be created using vibe coding techniques. Security workflows still assume a human authored the code, which is the gap market research on AI coding velocity documents. Procurement runs in quarters while extension installs run in seconds, and that mismatch creates blind spots in AI adoption.
Where Shadow AI Enters the Software Development Lifecycle
Unapproved AI arrives through six recurring entry points:
- Local developer environment: An IDE extension or CLI assistant installs in seconds and inherits the developer's repository access. Installing an editor plugin was never a procurement event.
- Source control and CI configuration: Assistant config files, workflow steps, and bot accounts land in the repository as ordinary commits. No reviewer caught them, because code review checks logic rather than tooling provenance.
- Dependency and package layer: Model SDKs and inference clients arrive as transitive dependencies of something the team approved. Traditional SCA primarily identifies dependency and vulnerability risk and may not provide visibility into the external AI services a package communicates with.
- Model-provider APIs and egress: A personal API key in an environment file or CI variable opens a paid channel to an external model. The key bypassed organizational review because the developer created it through a personal account.
- MCP servers and connectors: Model Context Protocol (MCP) server configs grant an assistant read and write access to repositories, ticketing, and internal services. That config sits on a workstation, not in an asset register.
- SaaS OAuth grants: Developers authorize a third-party AI product against the source control organization in a few clicks. OAuth consent is a user action, so it rarely opens a ticket.
Each entry point sits inside a system security already owns. But the AI signal in it isn't what that system was built to report.
The Biggest Security Risks of Shadow AI
Shadow AI risks are ordinary application security risks with the ownership record missing, spread across an expanding AI attack surface that no inventory covers. Six of them recur:
- Source code sent to unreviewed endpoints: Assistants ship file context, sometimes whole repositories, to a provider one developer picked. You inherit that vendor's terms unread, including retention.
- Unmanaged non-human identities: A personal model-provider key carries real spend and broad scope, with nothing scheduled to rotate it. Those non-human identities outlive the person who created them.
- Untracked model dependencies: Models and inference clients enter the build with license terms nobody recorded. When a hosted model retires, you can't say which services break.
- Incomplete audit trails for agent-authored changes: Commits may appear under a human account or a generic bot without records identifying the agent, instructions, or tools involved. That makes it harder to reconstruct how a change was produced after an incident.
- Unknown data residency: Prompts carrying customer data may cross regions the compliance program never mapped. An auditor asks where it went, and nobody knows.
- Risky agent skills and MCP servers: Unreviewed skills can introduce malicious instructions or unsafe workflows, while MCP servers can expose internal systems through excessive permissions or insecure tools. Without visibility into these components, security teams may miss paths to data exposure, unauthorized changes, or destructive actions.
How AI Coding Tools, Agents, and MCPs Create Hidden Risk
The risk in these components isn't sophistication. It's invisibility. A coding assistant holds a repository token, acts on branches, and writes files. It may not appear clearly in the systems AppSec typically monitors, such as asset inventories, identity directories, or change records. MCP servers extend that reach. They connect an assistant to internal tools through a standard protocol interface. For the mechanics, how MCP servers work covers them.
Three properties keep these components out of sight:
- They may share a developer’s identity: When an assistant uses a developer’s token, logs may not distinguish its actions from the developer’s own activity.
- They run locally: Configuration sits on the workstation, beyond the reach of repository scanning and infrastructure inventory.
- They act between recorded events: Work can happen in the editor without a detailed activity trail, leaving source control with the final change but limited context about how it was generated.
That's why blanket policy language fails here: enforcement needs a target the enforcing system can see.
How to Discover Shadow AI Across Development Environments
Every entry point leaves a signal in a system that already has an owner. This matrix maps them:
Work the matrix in this order:
- Inventory the identities: Pull every token, key, and OAuth grant with access to source control, then mark each with an owner and start from the unowned rows.
- Read the configs: Inspect repositories and workstations for assistant configurations, installed agent skills, and MCP server settings. Record the tools and models in use, where skills and servers came from, and what permissions they have.
- Watch the egress: Filter outbound logs for inference and model-provider domains, where traffic volume separates daily use from a one-time install.
- Reconcile and assign owners: Anything present and unapproved is shadow AI, and every item needs a named person on the team that introduced it.
Two shadow AI examples show what this turns up. An unsanctioned coding assistant appears in endpoint inventory, while egress logs reveal connections to an unvetted AI provider. Correlating those signals with endpoint activity helps establish which repositories may have been exposed. An unregistered model-provider key with no owner sits in the secret store under a generic variable name, and CI logs name what it calls.
Building Governance and Guardrails Without Slowing Developers
Shadow AI prevention holds when the sanctioned path runs faster than the unsanctioned one. Workable AI governance practices start from what discovery found, not from a framework written before anyone looked. Four moves do most of the work:
- Publish a short approved list: Name two or three assistants whose endpoints and data terms you have reviewed. Developers stop shopping once a sanctioned option exists.
- Issue managed keys by default: Provision model-provider credentials through the same path as any service credential, scoped and rotatable. Personal keys lose their purpose.
- Gate at the point of change, not the point of request: Enforce where the config, dependency, or grant actually lands. Policies are significantly less effective when they are not backed by enforcement at the point where configuration, dependency, or access changes occur.
- Fail safe on defaults: Set assistant and connector permissions to read-only until someone asks for more and says why. The quiet path becomes the least privileged.
The tradeoff is worth naming: every gate adds friction a developer routes around when the sanctioned path is slower. So the real measure is how much control survives contact with a weekly release train.
How Legit Security Helps Identify and Govern Shadow AI Risk
Legit Security is an Agentic AppSec and application security posture management (ASPM) platform. Its VibeGuard offering gives security teams visibility into coding agents, models, MCP servers, and agent skills running in developer environments, helping them identify unapproved components and enforce organizational policy. Automated software development lifecycle (SDLC) discovery works across repositories and pipelines. It does at scale what the sequence above does by hand across a sample.
An inventory doesn't set policy for you, and it won't say which assistants deserve approval. But it moves the argument from opinion to record. From there, Legit flags policy violations even when developers attempt to circumvent security controls, and enforces policy automatically across teams and tools. See visibility into AI usage and AI discovery capabilities, or book a demo today.
Frequently Asked Questions
How Is Shadow AI Different From Shadow IT?
Shadow AI is a form of shadow IT involving unapproved AI tools, models, agents, or skills. In development, these components may send source code to external services, use credentials, or make changes through connected tools. Discovery methods overlap, but AI introduces additional risks around data handling and agent actions.
Does Blocking AI Tools Actually Work?
Blocking a domain closes the visible path and leaves the rest. Developers move to personal accounts, unmanaged machines, or another provider serving the same model. Blocking suits a specific low-reputation vendor, but it's a poor substitute for a sanctioned option people prefer.
What Should You Do First if an Unapproved Assistant Is Already in Production Code?
Don't start with removal. Establish what the assistant could reach: repository scope, token permissions, and the branches it touched. Rotate the credentials it used, then review merged changes for secrets and permission drift. Decide on approval once the exposure is clear.
Who Should Own the Shadow AI Inventory?
AppSec owns it, because the signals live in source control, dependencies, and secrets. IT contributes endpoint and OAuth data, and security operations contributes egress. One accountable owner matters more than which team holds it, because the failure mode is an inventory nobody refreshes.
How Often Should You Re-Run Shadow AI Discovery?
Monthly for the full sweep, and continuously for identities and configuration changes. Tool releases and extension updates outpace any quarterly cycle. Discovery that runs only before an audit describes an environment that has already moved on.
Legit Security needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, check out our Privacy Policy.
More Articles

Application Security Automation: How to Automate AppSec Workflows
Application security automation covers triage, routing, gating and evidence. See which AppSec workflows to automate across the SDLC, and the rule to write for each.



See it in your stack
Every prompt, every commit, every deploy, covered the moment you're ready.


