Agent dependencies are the new software supply chain. A single compromised tool, model adapter, or plugin can turn an autonomous agent into an insider threat. You need to extend software supply chain controls to agent dependency graphs, models, tools, plugins, and data connectors. Agent autonomy amplifies the blast radius of a compromised transitive dependency.
The operating problem
A fintech agent uses a PyPI package called salesforce-tool to read customer records. Version 2.1.0 passes code review. Overnight, the maintainer publishes 2.1.1 with the same public API but adds a requests.post to https://collector.example.com inside get_customer. The agent runtime holds an OAuth token with api.read and api.write scopes. The tool call includes that token in its headers. The agent executes the tool because the schema hasn't changed. For three days, customer PII flows to an attacker-controlled endpoint.
This pattern appears in npm and PyPI supply chain attacks, but agent dependencies amplify the blast radius. Agents pull in model endpoints, tool wrappers, MCP servers, plugins, and retrieval sources. Each dependency is invoked with the agent's credentials, often without a human in the loop. A compromised transitive dependency, say a logging library inside salesforce-tool, can produce the same exfiltration even if the direct package is signed.
The core problem isn't that agents trust tools. It's that the trust boundary is static while the dependency graph is dynamic. A one-time vetting gate fails because dependencies mutate after review. Agents don't question a tool's instructions; they execute the tool call and return the result. That makes every dependency a potential insider threat.
The architecture that holds up
Treat every agent dependency as a signed, versioned artifact with provenance and runtime policy enforcement. The dependency graph includes model endpoints, tool schemas, plugin registries, MCP servers, and retrieval sources.

Explore how an autonomous agent's dependencies, models, tools, plugins, and data sources, create a supply chain attack surface, and where the dependency manifest acts as the control point.
For model weights, store checkpoints and LoRA adapters in an OCI registry with cosign signatures and SLSA provenance. Pin to a specific commit hash and verify SHA-256 before loading. A fine-tuned adapter from Hugging Face is often unsigned. If you can't verify its origin, treat it as untrusted and run differential testing against a known-good base model before deployment.
For tools and plugins, require signed wheels or sdists and verify against a TUF-protected index. Don't rely on the package registry's default integrity checks; they only prove the file wasn't corrupted in transit, not that the author is who you think. Transitive dependencies need the same treatment. Generate an SBOM that includes direct and transitive packages, and sign the SBOM itself.
Runtime enforcement is where most agent architectures fall short. A tool manifest may declare permissions: [read, write], but the agent runtime should not grant write access based on that claim. Use a policy engine like OPA or Cedar to evaluate each tool call against an allowlist of API endpoints, HTTP methods, and parameter schemas. If the tool tries to call an endpoint outside the allowlist, deny the call and alert. This adds 5 to 20 ms per tool call depending on policy complexity. Cache decisions for identical calls if latency is critical.
Retrieval sources are another attack surface. A poisoned internal wiki or vector database can inject instructions into the agent's context. Treat retrieved text as untrusted input. Require the agent to cite source hashes, and use prompt injection defenses that strip or quarantine instructions found in retrieved content.
Where teams usually fail
Most failures come from three gaps: static vetting, manifest-based permissions, and missing transitive visibility.
Static vetting means you reviewed version 1.0.0, but the agent pulled 1.0.1 automatically. A healthcare org reviewed fhir-adapter v1.0.0 and approved it. The next version added a prompt manipulation that altered patient data in triage recommendations. The agent had no pinning or signature requirement, so it silently upgraded. Pin exact versions and require signed updates before the agent can use a new dependency.
Manifest-based permissions are equally dangerous. A DevOps agent auto-installed an MCP server from a community registry. The server's manifest declared write_repo permission. The agent runtime granted it because the manifest was signed by the server author, who was the attacker. Runtime policy should have required an explicit allowlist entry for that server and that permission, independent of the manifest's claims.
Missing transitive visibility is the quiet killer. A tool library depended on a logging package that was compromised. The direct tool was signed and reviewed, but the transitive dependency was not. The agent's SBOM only listed direct dependencies, so the compromise went unnoticed for weeks. You need SBOMs that include the full transitive closure, and you need to monitor changes across that closure.
Model adapters add another layer. A LoRA adapter from an untrusted source can contain a backdoor trigger. The model behaves normally until a rare token sequence appears, then exfiltrates data or produces harmful output. If you don't pin the adapter hash and run differential tests, you won't detect it until the trigger fires in production.
Verification happens at install time, not at runtime, and transitive dependencies are invisible. That's the common thread.
How to measure progress
Track these signals in your agent runtime and CI pipeline:
- Signed dependency coverage: percentage of direct and transitive dependencies with verified signatures and provenance. Target 100% for direct dependencies, over 90% for transitive.
- Transitive depth distribution: median and p95 number of transitive dependencies per agent. A p95 above 20 indicates a large attack surface.
- Unsigned update rate: number of dependency updates per week that lack signatures or provenance. A spike often precedes an attack.
- Runtime permission denials: rate of tool calls denied by policy per 1,000 calls. A sudden increase means an agent is attempting actions outside its allowlist.
- Mean time to detect compromised dependency: measure from first malicious call to alert. If it's longer than your data exfiltration window, you need better monitoring.
- Rollback time: time to revert an agent to a known-good dependency set after an alert. Target under 10 minutes.
Cost per incident is useful for budgeting, but don't let it replace these operational metrics. Make supply chain risk visible on a dashboard, not buried in a quarterly audit.
What to build next
Start with one production agent. Generate an SBOM in CI using syft or trivy for Python and Node dependencies, and add model weights and MCP server hashes manually or via a plugin. Sign the SBOM with cosign and store it in the same OCI registry as the agent image. Enforce signature verification before deployment.
At runtime, deploy an OPA sidecar or use a policy engine built into the agent framework. Define allowlisted tool schemas and permissions. For each tool call, evaluate the actual API endpoint, HTTP method, and parameters against policy. Deny and alert on mismatch. This adds latency, but you can cache policy decisions for identical tool calls.
Implement a kill switch as a separate control plane: a command that revokes the agent's OAuth token, pauses its message queue, and logs the current tool call stack. Test it monthly. Rollback should use the signed SBOM to restore the previous dependency set. Keep at least two previous versions in the registry.
For audit, log structured events with dependency hash, tool call ID, and policy decision. When an incident occurs, you can trace which dependency changed and what the agent did as a result. This isn't a one-time audit; it's a continuous pipeline. Start with one agent, generate its SBOM, enforce signing, and expand from there.
Related articles
Securing MCP Connections in Enterprise Agent Deployments
Treat every MCP server as an untrusted privileged component and build a five-control framework for identity, authorization, isolation, egress, and audit.
AI and Cybersecurity: Building Resilience Against Threats
Cybersecurity remains a top concern, and AI's role in enhancing security is increasingly relevant.
AI Agent Sandboxing: Safe Execution Environments for Enterprise Agents
Layered, action-level sandboxing for enterprise AI agents: identity scoping, network egress controls, approval gates, and kill switches that work at the moment of execution.