
Key Takeaways
- Coding agents such as Claude Code, Cursor, GitHub Copilot, and OpenAI Codex now choose and install open-source packages mid-task. The step that used to validate a package before it ran no longer happens.
- A package's install script executes with full user privileges the moment it lands. Attackers already target that moment, and the last year of incidents proves it.
- With Malicious Software Package Protection, security teams can approve coding agents without accepting an unvetted install path. Known malicious packages are stopped before they run.
- Developers keep moving. A blocked install becomes a redirect to a safe package, and security gets a finding with the agent, the user, and the package already attached.
A developer asks their coding agent to add retry logic to an API client. The agent decides it needs an HTTP library, picks one, runs the install, and keeps going. Thirty seconds later, the feature works. Nobody looked at the package name. Nobody checked the version. Nobody could have, because nobody knew the agent was going to install anything until it already had.
That’s a new situation for security teams. In the traditional software supply chain, a dependency went through a pull request, a lockfile, a build, and a scan before it ran anywhere that mattered. There was a window to validate it. Coding agents close that window. They make the dependency decision at runtime, on a developer's machine, with the developer's credentials, and they run the install in the same breath.
In Securing the Agent Supply Chain, we described how agents assemble their dependencies at runtime, from skills, MCP servers, websites, and repositories, with no manifest and no build step where anything gets checked. Software packages belong on that list. They are the dependency agents pull in most often, and the ones with the longest history of being weaponized.
Attackers Are Already Here
None of this is hypothetical. Since last summer, supply-chain incidents have read like a target list for agent installs.
- A planted file is enough. In October 2026, researchers found a fake engineering-notes file in a customer's Downloads folder that told OpenAI Codex to install a malicious npm package. Codex did so in more than 90% of test runs. Nobody clicked anything.
- Packages that come for the agent's own keys. In August 2026, the CHAINDROP worm compromised more than 400 npm packages with over 1.3 billion monthly downloads. It harvests Anthropic, Codex, and Cursor credentials and plants hooks in Claude Code settings so it runs again at the next session.
- Malware that uses the agent against you. In August 2025, the compromised Nx build packages shipped a postinstall script that invoked local AI coding tools, including Claude Code and Gemini CLI, to hunt the filesystem for secrets. Wiz's post-incident analysis counted 2,180 exposed accounts and 7,200 repositories.
- Two hours is enough. In September 2025, a phished maintainer account pushed crypto-stealing versions of chalk, debug, and more than a dozen other packages with over two billion combined weekly downloads. They were live for roughly two hours. An agent that installed in that window got the payload.
- Agents install packages that never existed. Researchers at USENIX Security 2025 found that 19.7% of 2.23 million AI-generated code samples referenced a package that does not exist. Attackers register those names. The agent installs whatever answers.
Zenity Labs has watched the same pattern in the skills ecosystem. In Attackers Target Agents via The Skill Supply Chain, Michael Bargury traced a campaign whose skills were clean when they trended, then weaponized, with trojanized PyPI releases and an npm postinstall hook as the triggers. The attack lived in the installation step. Our AI Total research found the same thing at scale: the dangerous part of a dependency is what happens when it runs, not what it says on the page.
Why Your Existing Tools Miss It
Security teams already own tools that look at packages. Each one was built for a different moment than the one that matters here.
Registry proxies and curated mirrors only see what is routed through them. A laptop or agent sandbox that was never pointed at the proxy walks past it, and several cover only one package ecosystem. The agent does not even know the proxy exists.
Endpoint sensors catch the file, not the agent. They quarantine a download, but the agent never learns why. It retries, works around the block, or stalls, and the alert names a process on a device, not the agent, the user, or the conversation that caused it.
Developer wrappers and advisory tools depend on a human. A wrapper only runs when a developer prefixes the command. An advisory tool only answers when the model decides to ask. An agent running a bare install command in a non-interactive shell is covered by neither.
Sandbox allowlists gate hosts, not packages. Once the public registry is allowed, every package on it is allowed.
Repository and CI scanning runs after the fact. By the time a pull request is scanned, the install script has already executed on the laptop with the developer's access.
All of them share a deeper gap: none knows that an agent made the call. As we argued in The Coding Agent Blind Spot, an agent's package install looks identical at the process level to a developer's. Endpoint tooling sees a process. Nothing sees an agent, acting on a prompt, inside a conversation, choosing a dependency on its own. That’s where the control has to live. Keep your endpoint sensor; it catches whatever runs. Zenity stops the agent from running it, tells the agent what to do instead, and keeps the story.
What Changes With Malicious Software Package Protection
Zenity puts the validation step back, inside the agent's loop, at the moment the agent decides to install. The package is checked before anything runs, so the question "could this agent have installed malware?" gets an answer other than "we hope not".
- Every install the agent attempts is checked first. The install is intercepted before the command executes, not discovered after it ran.
- A hijacked sub-dependency is caught, not just the package the agent named. Zenity works out the exact version and everything it would pull in. That is where most compromised packages hide.
- Every package is checked against current threat intelligence at the moment of install. A package hijacked yesterday is caught today, inside every coding agent you run.
- Known malware never executes. A malicious verdict triggers a Zenity-managed policy. Choose Prevent, and the install is blocked. Choose Detect, and the install is recorded while you build confidence.
The block is not a dead end for the developer. The agent is told why it was stopped and steered to a different trusted package or version. It reads the message, picks a safe alternative, and keeps working. The developer sees a brief detour, not a broken task. We wrote about why steering beats a bare refusal in Stop Waiting for the Alert, and this is that principle applied to package installs.
From Block to Decision in Minutes
A blocked install at the package manager tells you a package was bad. A Zenity finding tells you what to do next. A Prevented finding means the code never ran: confirm the agent moved on and close it. A Detected finding means it did run: treat the machine as compromised and start there.
Each finding arrives with the package and version, the verdict, the command, the agent, the user, and the conversation already attached, so triage takes minutes instead of a forensics ticket. Because findings live in the same platform that inventories your agents and governs their behavior, a malicious package is handled as agent risk with a blast radius, not as an isolated desktop event.
Nothing to Build, Nothing for Developers to Notice
Turn it on, choose Detect or Prevent, and you’re protected. Zenity manages the policy for you, so there are no rules to write and nothing to tune. When a package cannot be assessed, you decide whether speed or security wins. Let the install through and record it, or hold it until a verdict is available. If Zenity already governs your coding agents, this is a switch, not a rollout. Package verdicts are also available in your own custom policies if you want to combine them with other context, such as an install that follows the agent reading a secrets file.
Clean installs run exactly as they did before. Only installs are checked, and only malicious ones are stopped. Private, internal packages are never sent out, logged, or blocked.
At launch, Malicious Software Package Protection covers the most widely used open-source package ecosystems, including dependencies, across Claude Code, Cursor, GitHub Copilot, and OpenAI Codex on macOS, Windows, and Linux.
Who It's For
Security teams that have approved coding agents, or are about to, and need an answer to one question: if an agent installed malware yesterday, how would you know? Now the answer is a finding with the agent, the user, and the package on it. You can say yes to coding agents without reopening the supply-chain question.
Platform and developer productivity teams that want agents fast. The control adds nothing to a clean install and turns a blocked one into a redirect. No developer notices until something is malicious.
Application security teams that own the software supply chain and lost sight of it the day agents started installing on their own. The validation step is back, in the one place it can still run.
What's Next
Malicious Software Package Protection extends the loop Zenity already runs for skills, MCP servers, and repositories, discover, assess, enforce, investigate, to the software agents pull in while they work. We will keep widening the ecosystems and agents it covers, and keep tying every verdict back to the agent that triggered it.
It is available now to Zenity customers, and the setup guide is in the Zenity Knowledge Center.
If you are not yet a customer, book a demo, and we will show you a coding agent reaching for a malicious package, and stopping before it runs.
All ArticlesRelated blog posts

Stop Waiting for the Alert: Enforcing AI Agent Behavior with Zenity Boundaries
Every security team I talk to has some version of the same document. It might be called an “AI Acceptable Use Policy”...

Zenity Launches Universal Runtime Control for Claude Enterprise
Anthropic's inference hooks update lets security teams validate Claude's tool calls before they run. Zenity supports...

Architecting Trust: The Data Pipelines and Infrastructure Behind The Guardian Agents
As AI agents operate with increasing autonomy in enterprise production, the sheer volume of security telemetry...
Secure Your Agents
We’d love to chat with you about how your team can secure and govern AI Agents everywhere.
Get a Demo