Subscribe to the Non-Human & AI Identity Journal

What breaks when agents can fetch untrusted skills or code automatically?

The trust boundary breaks between instruction intake and privileged execution. If an agent can download code, read secrets, and act on production systems in one flow, malicious input can become authorised behaviour. Security teams need sandboxing, code vetting, and permission separation before they allow those workflows in production.

Why This Matters for Security Teams

When an agent can fetch untrusted skills or code automatically, the security model shifts from simple content safety to supply chain trust. The core issue is not just whether the code runs, but whether the agent is allowed to treat downloaded artefacts as if they were approved operational logic. That is where NIST AI Risk Management Framework becomes useful: it pushes teams to define governance, traceability, and bounded impact before deployment.

This matters because agentic systems often collapse multiple steps into one execution path. A model can interpret a request, retrieve a tool, execute code, and access environment secrets without a meaningful handoff between review and runtime. Once that happens, prompt injection, poisoned skills, or compromised package sources can become authorised behaviour rather than blocked content. The risk is higher when the agent has network access, filesystem write permissions, or integration keys that can be reused outside the initial task.

Security teams often assume isolation exists because the agent has a “tool” boundary, but that boundary is weak if the tool itself can fetch code or make downstream decisions. In practice, many security teams encounter compromise only after a malicious skill package has already executed with inherited privileges, rather than through intentional approval.

How It Works in Practice

The safest operational model is to treat every externally sourced skill, plugin, module, or code snippet as untrusted until it passes explicit controls. That means separating retrieval, inspection, approval, and execution into distinct stages. Current guidance from the OWASP Top 10 for Agentic Applications 2026 and the CSA MAESTRO agentic AI threat modeling framework is aligned on one point: agent autonomy should be bounded by policy, not by convenience.

  • Use a hardened sandbox or isolated runner for any downloaded code.
  • Verify source provenance, signature, and integrity before execution.
  • Keep secrets and production tokens out of the agent’s retrieval and runtime path.
  • Require human approval or policy gates for new skills, new tools, and privilege expansion.
  • Log every fetch, prompt, tool call, and execution outcome for later review.

For teams mapping controls, the practical link to NIST SP 800-53 Rev 5 Security and Privacy Controls is straightforward: apply least privilege, system integrity, configuration management, and audit logging to the agent runtime and its software supply chain. The key point is that the model should not be able to both discover and execute new capability without an explicit trust decision. That becomes even more important when the agent can reach internal APIs, because the blast radius then extends beyond the model itself into adjacent production systems. These controls tend to break down when development teams allow self-updating agents in connected production environments because the update path bypasses software review and privilege separation.

Common Variations and Edge Cases

Tighter control often increases operational overhead, requiring organisations to balance fast agent iteration against stronger assurance. That tradeoff is real, especially for workflows that depend on rapid skill discovery or dynamic tool use. There is no universal standard for this yet, so best practice is evolving toward risk-tiered approval rather than blanket permission.

Some environments can safely allow limited automation if the agent only retrieves from a curated internal catalog, executes in a disposable sandbox, and has no access to secrets or production networks. Other environments, especially those with regulated data, high-value infrastructure, or customer-facing automation, need much stricter controls and explicit allowlists. Where agent behaviour touches threat detection or adversarial abuse patterns, the MITRE ATLAS adversarial AI threat matrix is useful for thinking about prompt injection, tool misuse, and poisoned content as operational threats, not abstract model risks.

One important edge case is delegated code execution through “helper” agents or shared worker services. If those helpers inherit broad credentials, the security design can fail even when the primary agent is constrained. Another is package ecosystems that silently pull dependencies at runtime, because the trust decision shifts from deployment time to execution time. For that reason, agent teams should align software intake, model governance, and identity controls before enabling autonomous retrieval in production.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, MITRE ATLAS and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 Covers tool abuse, prompt injection, and unsafe autonomy in agent workflows.
NIST AI RMF GOVERN Govern function addresses accountability, policy, and traceability for risky AI operations.
MITRE ATLAS AML.T0065 Maps adversarial abuse paths such as prompt injection and model-assisted misuse.
NIST AI 600-1 GenAI profile guidance supports securing model inputs, outputs, and tool usage.
CSA MAESTRO Threat modeling for agentic systems covers runtime authority and tool-chain risks.

Use agentic AI controls to separate retrieval, approval, and execution for all external skills.