
Shadow AI in software development: Risks and how to govern it

Shadow AI in software development is any AI tool, agent, or model used without approval from security or IT. AI writes code, pulls packages, and makes decisions faster than humans can review them. AI tools suggest and install dependencies that nobody reviewed, and a ban won't fix that. Controlling what can come in at the registry will, because every package faces the same rules no matter which tool asked for it.
Key takeaways
- Shadow AI isn't only people pasting code into a chatbot. It also covers what AI tools install, download, and connect to.
- AI models sometimes recommend packages that don't exist, and attackers can register malicious packages under those names. This is called slopsquatting.
- Citizen developers and vibe coders now ship software too, often without a security review.
- Bans tend to push AI use out of sight. Governing packages at the registry gives you control without slowing people down.
Cloudsmith's 2026 Artifact Management Report found that 93% of organizations use AI to accelerate software development. If your developers use AI coding assistants, some of that use is likely happening outside security approvals. The cost of unmanaged AI is real, too. IBM's 2025 Cost of a Data Breach Report found that one-in-five organizations had a breach tied to shadow AI, and that high levels of shadow AI added about $670,000 to the average breach cost.
This post covers what shadow AI looks like in software development, how it introduces unreviewed packages into your builds, why citizen developers raise the stakes, and how to govern it all at the registry.
What is shadow AI in software development?
Shadow AI in software development is the use of AI coding tools, agents, models, and AI-generated code or dependencies without the knowledge or approval of your security and IT teams. It's the AI-era version of shadow IT, with one big difference: these tools don't just store or move data. They write code and pull in software on their own that impacts what you ship to users.
In practice, it looks like this:
- A developer uses a personal AI coding assistant account instead of the approved one.
- An agent runs
npm installorpip installand adds whatever it thinks will work. - Someone connects an unvetted MCP server to their editor to "just try it."
- A teammate downloads a model or an agent skill from a public hub and drops it into a project.
- A business user builds an internal app with a prompt and ships it with no developer involved.
The primary risk is the data and environments an AI agent has access to and what the packages it chooses to bring in.
How do AI coding tools pull in packages nobody approved?
We commonly see AI coding tools introduce risk in one of four ways:
1. Hallucinated package names. AI models sometimes recommend packages that don't exist. A 2024 academic study of code-generating models found that those models hallucinated 19.7% of the packages they recommended. Open-source models hallucinated more often (about 21.7% on average) than commercial ones (about 5.2%). Rates vary by model and task.
An attacker can register a package with a hallucinated name and put malicious code in it. That's slopsquatting, and it depends on the model repeating the same hallucination for other users. (Our guide to detecting slopsquatting and typosquatting goes deeper.)
2. Agents that install things themselves. Many AI coding agents can run terminal commands, including package installs. If auto-approve is on, or someone clicks "allow" one time too many, the dependency never gets reviewed.
3. MCP servers and agent skills. Model Context Protocol (MCP) servers connect AI tools to email, databases, and other systems. Skills are bundles of instructions and scripts that agents load to learn a task. Both usually come from public sources, and both run with the same permissions as the person or machine that initiated the task. Koi Security reported that an npm package called postmark-mcp changed behavior in a later version and began copying emails to an outside address. They described it as the first malicious MCP server seen in the wild.
4. Models, skills, and other AI artifacts. A pre-trained model from a public hub is software too, and it's rarely tracked the way a library is. If your inventory only covers libraries, you have a blind spot. (More in AI artifacts: the new software supply chain blind spot.)
Why do citizen developers raise the stakes for shadow AI?
A citizen developer is someone outside the engineering team, such as an analyst or operations lead, who builds apps and automations with low-code tools or, increasingly, AI. Vibe coding, where you describe what you want in plain language and let the model write the code, lowers the barrier for software development.
This means that people are building software who may never have heard of a dependency or a CVE. The Cloud Security Alliance's AI Safety Initiative noted in a June 2026 research note that vibe coding went from a fringe technique to broad enterprise adoption in roughly 16 months, and that governance hasn't kept up.
Are citizen developers a security risk? Not intentionally. The risk is structural. A developer has context that gives them pause when they see an unfamiliar package. A citizen developer usually has no reason to, and no way to tell a real library from a fake one. Their apps also tend to skip code review and the build pipeline where a scanner might catch something.
The answer is to give people a safe default. If an AI tool can only install packages from an approved, governed source, it doesn't matter that the person doesn't know what to check. The check has already happened.
Why don't scanners and AI bans solve shadow AI?
Scanners look at what's already in your environment. A software composition analysis (SCA) scan checks dependencies after they've been added to a project, and it's strongest on known vulnerabilities. A brand-new malicious package may have no record yet. (A dependency firewall closes that gap. We cover it in a dependency firewall gives your scanner better inputs.)
Bans push usage out of sight. If people believe a tool makes them faster, a policy memo won't stop them. You just lose visibility, and the same AI use moves to personal accounts and machines.
How do you govern the packages AI tools pull in?
The most practical place for a control is the package registry, because you can configure every install to pass through it. If the registry is the only route for packages, you don't need to know which AI tool made the request. The same rules apply either way.
- Route all package traffic through one registry that proxies upstream sources. Point npm, pip, Maven, and container pulls at your private registry. Now there's one place to apply rules and one place to look when something goes wrong.
- Block packages until they're scanned. Hold new packages from upstream sources until they've been checked, so problems are caught before a build ever sees them.
- Set a cooldown policy. A cooldown holds back newly published packages until they reach a minimum age, so unproven code can't slip into your builds. See why security teams are asking for package cooldown policies.
- Quarantine known-bad packages automatically. Cloudsmith integrates with the OSV data feed to detect known malicious packages, and you can write policies to quarantine and block them from developers and pipelines. Think of this as the reactive layer and the cooldown as the proactive one..
- Write your rules as policy as code. Approved sources, licenses, and minimum package age are easier to audit and update as code than blunt on/off controls. See policy as code automation with EPM.
- Cover more than libraries, and keep a record. Hold MCP servers, agent skills, and models to the same standard, and log every allow, block, and quarantine decision. (See give your agent skills a trusted control plane.)
The result: developers and citizen developers keep using their AI tools, and the registry quietly handles the part nobody wants to think about.
What can't a registry do?
No single control point covers shadow AI, so here are the limits.
- It doesn't stop data leakage. If someone pastes proprietary code into an unapproved chatbot, the registry never sees it. That needs separate controls and clear guidance.
- It can't tell you which AI tools people use. You'll still need discovery through endpoint, network, or identity tooling.
- It only governs what goes through it. Developers that install straight from a public source bypass the registry. Point package managers at your registry and limit direct access where you can.
- Cooldowns depend on upstream metadata. Age is based on the publish date the upstream source reports. If that's missing for a package, the cooldown can't apply.
Not sure where your team stands today? Take Cloudsmith's Artifact Security Maturity Assessment to see how your controls compare and what to tackle first.
Frequently asked questions
More articles


Where SAST stops and artifact management begins

Software supply chain defense in depth: A stage-by-stage guide

Critical PHP vulnerabilities in PHP2Shell expose web infrastructure to remote code execution

LiteLLM 1.107.0 compromised on PyPI

