Agent security basics for small teams
The main ways agents get attacked or misused, and ten practical habits a small team can adopt this week to limit the damage.
Updated 2026-11-19. "(source N)" refers to the numbered list at the end.
What is different about agents
A chatbot that says something wrong is embarrassing. An agent that does something wrong can cost money. Agents hold keys to your email, files, CRM and payment tools, and they act on text they read. That combination is the whole security problem.
The core weakness is prompt injection: instructions hidden in content the agent reads, such as an email, a web page or a document, that steer it off course. It sits at the top of OWASP's risk list for AI applications (source 1). OWASP also published a separate top 10 for agentic applications in December 2025, developed with more than 100 experts, researchers and practitioners as a starting point for builders and defenders (source 2).
Accept that it cannot be fully fixed
The UK's National Cyber Security Centre argues that prompt injection is not like SQL injection, which has a clean fix. Language models do not reliably separate instructions from data, so the goal is to reduce the chance and limit the harm (source 4). If a task cannot tolerate that leftover risk, the centre suggests an AI model may be the wrong tool for it (source 4).
Be wary of any product that promises to block every attack. Simon Willison points out that a filter catching 95% of attacks would be a failing grade in normal web security (source 3).
Avoid the lethal trifecta
Willison's most useful rule: an agent becomes easy to exploit when it has private data, sees content an attacker can control, and has a way to send data out (source 3). Remove any one of the three and most data-theft attacks stop working.
In practice, that means splitting jobs. The agent that reads inbound customer emails should not also have a tool that posts to arbitrary web addresses. The agent that browses the web should not also see your client files.
Ten habits for a small team
- Give each agent its own account and API keys, never a person's admin login. You can then see what it did and switch it off alone.
- Grant the least access that works. The MCP security guide warns that broad tokens turn one leak into a full breach, and recommends starting with narrow, read-only scopes (source 5).
- Keep secrets out of prompts, skills and shared config. Use environment variables or a secrets manager.
- Require a person to approve sends, payments, deletions and anything public. The NCSC advises relying on fixed, non-AI checks to limit what the system can do (source 4).
- Run agents that execute code inside a sandbox, container or virtual machine. Claude Code, for example, offers sandboxed commands and recommends a VM when working with external services (source 7).
- Limit outbound network access to the sites the agent needs. Claude Code can block tools like curl by rule and restrict network use through its sandbox (source 7).
- Install MCP servers and skills only from sources you trust, and read them first. Anthropic advises treating a skill like installing software, since a malicious one can misuse tools or leak data (source 6).
- Log every tool call with enough detail to reconstruct what happened. The NCSC notes failed or odd calls can reveal someone probing (source 4).
- Know your vendor's data terms. OpenAI, for example, keeps API data for up to 30 days for abuse checks unless you qualify for zero retention (source 8).
- Write a one-page kill switch plan: which keys to revoke, which integrations to disconnect, and who to call.
Local tools need care too
Agents and MCP servers that run on a laptop act with that user's full rights. The MCP guide describes how a malicious install command can quietly copy SSH keys or delete files, and asks apps to show the exact command and get consent before running it (source 5). Read install commands before you paste them, and avoid running agents as an administrator.
Claude Code shows a trust prompt the first time it opens in a new folder, and asks separately before using MCP servers defined in a project file (source 7). Do not click through those prompts on a repository you did not write.
Train people, not just systems
Staff are part of the attack surface. Teach them that a forwarded email can carry instructions for the agent, that an agent's confident summary can be wrong, and that they should report odd behaviour rather than work around it. Make it normal to double-check an agent before acting on anything that matters.
Start small
You do not need a security team to do this well. Pick one agent, map what it can read, what untrusted content it sees and how it could send data out. Remove one leg of the trifecta, put approvals on risky actions, and turn on logging. Repeat for the next agent. A few hours of this beats any tool you can buy.
Sources
Written by Agents Lookup in our own words. Facts come from these pages:
- 1. OWASP GenAI Security Project: LLM01 Prompt injection: genai.owasp.org/llmrisk/llm01-prompt-injection
- 2. OWASP GenAI Security Project: Top 10 for Agentic Applications for 2026: genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026
- 3. Simon Willison: The lethal trifecta for AI agents: simonwillison.net/2025/Jun/16/the-lethal-trifecta
- 4. NCSC: Prompt injection is not SQL injection: www.ncsc.gov.uk/blog-post/prompt-injection-is-not-sql-injection
- 5. Model Context Protocol: Security best practices: modelcontextprotocol.io/specification/latest/basic/security_best_practices
- 6. Anthropic: Agent Skills overview: platform.claude.com/docs/en/agents-and-tools/agent-skills/overview
- 7. Claude Code Docs: Security: code.claude.com/docs/en/security
- 8. OpenAI: Your data: developers.openai.com/api/docs/guides/your-data