AI Security · Nov 3, 2026 · 3 min read
Who checks what your AI agents install?
AI agents pull packages and MCP servers with your permissions. LiteLLM showed what that costs. Here's how to lock down the agent supply chain.
- #supply-chain
- #ai-agents
- #mcp
AI SecurityDuring Black October, the loudest stories were the big RCEs. The one that deserves more attention was quieter.
According to reports, on October 21 a malicious LiteLLM release was pushed to PyPI and shipped in Docker images. It was reportedly live for under two hours. LiteLLM is an AI gateway: the thing that sits between your apps and your model providers, holding the API keys for all of them.
That's the new supply chain target. Not just your app's dependencies, but your agents' dependencies.
Agents install things. With your permissions.
Think about what a normal AI coding session looks like now:
- The agent runs
npm installorpip installbecause it decided it needed a library. - You add an MCP server with one
npxcommand so the agent can reach a new tool. - That MCP server runs locally, as you, with access to your files, your shell, and whatever credentials are in your environment.
Every one of those steps pulls code from a public registry and runs it on a machine with real access. Most teams review a new dependency in a pull request. Almost nobody reviews what an agent pulled in at 2 PM on a Tuesday because it felt like it.
Why this is worse than normal dependency risk
Three things make the agent supply chain a juicier target:
- Speed. An agent will happily take whatever version is newest. A poisoned release that's live for two hours only needs to catch the agents that ran in those two hours.
- Privilege. Developer laptops and CI runners hold cloud credentials, Git tokens, and model API keys. AI gateways and MCP servers often hold several of those at once.
- Visibility. Agent config files (
.mcp.json,.cursor/mcp.json, and friends) change quietly. Nothing in most security stacks treats "new MCP server registered" as an event.
What to do about it
Pin and lock everything. Lockfiles with hashes, not version ranges. If the agent wants a new dependency, that's a change to the lockfile, and it goes through review like any other change.
Add a release cooldown. Most malicious releases are caught within hours or days. Don't take versions younger than that. Both major package managers can already do this:
# npm: resolve as if it were 3 days ago
npm install --before="$(date -d '3 days ago' +%F)"
# uv: ignore anything published in the last 3 days
uv pip install --exclude-newer "$(date -d '3 days ago' +%FT%TZ)" -r requirements.txtThree days won't stop a patient attacker. It does stop the "live for two hours" attack, which is most of them.
Inventory your MCP servers. Treat each one like a browser extension with shell access. Know which ones are installed, where they came from, and who approved them. Keep an allowlist for the ones your team relies on.
Box the agent in. Run agents in a container or dev container with only the credentials the task needs. Short-lived, scoped tokens beat a laptop full of long-lived keys. Restrict outbound network access so a poisoned package can't reach whatever server it wants to send your keys to.
Pull secrets out of the gateway's reach. If you run an AI gateway, it's now a tier-one asset. Patch it like one, monitor it like one, and rotate its keys like they'll leak someday.
What to detect
The behaviors are more reliable than the package names:
- Changes to agent config files that add an MCP server (file integrity monitoring covers this).
- A package install followed by outbound connections to a destination you've never seen.
- Agent or MCP processes reading credential files they normally don't touch.
file.path endswith (".mcp.json", "mcp.json", "settings.json")
AND file.path contains (".claude", ".cursor", ".vscode")
AND event.action == "modified"
That will be noisy at first. Baseline it, then alert on what's new.
Where this goes
AI agents are the newest, fastest consumers of open source we've ever had, and they don't read changelogs. The fix isn't to stop using them. It's to give them the same guardrails we spent a decade building for CI: pinned inputs, reviewed changes, least privilege, and someone watching the logs.
Next week: what to do when the advisory for one of those packages drops, and how to get from "new CVE" to "these hosts are affected" in minutes instead of days.