All articles

Nov 5, 2026 · 9 min read

A security checklist for AI agents

By Asphaleia Team

Seven areas to check before an AI agent touches real systems, from tool permissions and prompt injection to logs, retention and a kill switch.

An AI agent is ready for real systems when it can do only what its job needs, treats everything it reads as untrusted, never holds credentials itself, records every action, keeps data no longer than necessary, runs on vendor settings you have checked, and can be stopped in seconds. This checklist covers those seven areas, each check with its reason, so you can judge whether it applies instead of ticking it blindly.

Agents need a checklist of their own because they mix two things ordinary software keeps apart: instructions and data. A web form treats what a user types as data. A language model reads instructions and data as one stream of text, so a sentence hidden in an email or a web page can steer it. Most of the checks below follow from that.

How to use this checklist

Run it twice: when you design the agent, while changes are cheap, and before launch as a release gate. Record each check as done, not applicable (with the reason) or accepted risk (with an owner and a review date). The agent still lives inside an ordinary application, so the [secure-by-default web checklist](/blog/secure-by-default-web-checklist) applies as well.

Permissions: give the agent a job, not a master key

CheckWhy
List every tool the agent can call, and remove any its job does not need.Each tool is a capability an attacker can borrow. An agent that answers questions needs no delete function.
Separate read from write, and grant write access per action rather than per system.Reading an order and refunding it are different risks.
Give the agent its own identity with [least privilege](/glossary/least-privilege), never a shared admin account.You can see what it did, limit what it reaches and revoke it without breaking anything else.
When the agent acts for a user, enforce that user's permissions on the server.Instructions in a prompt are not access control. Without this, a customer can ask the agent for data they could never open directly.
Cap volume and value: actions per hour, amount per transaction, recipients per message.A manipulated agent then does limited damage before anyone notices.
Require human approval for irreversible or high-value actions.It is the last line when everything else fails. See [when AI needs a human's approval](/blog/when-ai-needs-human-approval).

Prompt injection: treat everything the agent reads as untrusted

[Prompt injection](/glossary/prompt-injection) is text that tries to override the agent's instructions. It is direct when a user types it, and indirect when it arrives inside content the agent reads: an email, a PDF, a web page, a product review, a support ticket. Indirect injection is the more dangerous kind, because the person using the agent never sees the attack. No technique removes the risk completely today, so the goal is to limit what a successful injection can do.

  • **Keep instructions and data apart.** Put retrieved content in clearly marked sections, tell the model it is data, and never build system instructions from text a user or a document supplied.
  • **Break the dangerous combination.** An agent that can read private data, reads untrusted content and can send information out (email, web requests, messages) can be tricked into leaking. For each task, remove at least one of the three.
  • **Do not let content authorise actions.** If an email asks for a refund, the refund goes through the normal checks and approvals, whatever the email claims about urgency or authority.
  • **Restrict where data can go.** Allow-list the domains the agent may fetch from or link to, and do not render images or links from model output unchecked. An image address can carry data out in its query string.
  • **Treat model output as untrusted input** to the next step. Escape it before it reaches a web page, and never pass it straight into a database query, a shell command or a file path.
  • **Test with real injection attempts** hidden in the kinds of documents your agent reads, in Arabic as well as English.

The OWASP Top 10 for LLM Applications, a companion to the classic [OWASP Top 10](/glossary/owasp-top-10), lists prompt injection, sensitive information disclosure and excessive agency among its main risks, and it is a useful map for a review.

Secrets: the model never sees a credential

  • **No secrets in prompts, system instructions or tool descriptions.** Assume the model can be persuaded to repeat anything it can read.
  • **Add credentials in the tool layer.** The model asks to call 'look up order'; your server-side code attaches the key and makes the call.
  • **Use short-lived, narrowly scoped tokens** for each tool, and rotate them on a schedule and after any incident.
  • **Separate environments.** Test agents use test keys against test data, so a leak during testing exposes nothing real.
  • **Keep keys in a secrets manager,** not in plain-text fields of automation tools, in spreadsheets or in code. Low-code workflows deserve the same care as code.
  • **Vet third-party tool servers.** A connector, plugin or [Model Context Protocol](/glossary/model-context-protocol) server runs with whatever access you give it. Pin versions, read the tool descriptions it sends the model, and prefer connectors you can inspect.

Logging: record each run so you can say what happened

When an agent does something wrong, the first question is why, and only logs can answer it. Record each run as a trace:

  • the request, and who or what triggered it;
  • the instructions and model version in effect;
  • the documents and records retrieved;
  • every tool call, with its arguments and result;
  • approvals: who gave them and what they saw;
  • the final output, and what was sent where.

These logs hold the most sensitive mix in the system: customer messages, personal data and internal records. Protect them like production data: limit who can read them, mask card numbers, identity numbers and passwords before storage, and set a retention period. Feed them into [monitoring](/services/ai-automation/ai-monitoring) with alerts on unusual patterns, such as a burst of tool calls, refunds outside working hours or a run of refusals.

Data retention: decide what is kept, where, and for how long

  • **Know what the model provider keeps.** Many providers store prompts and outputs for a period, for example to monitor abuse, and terms often differ between consumer and business plans. Read the current terms and get answers in writing.
  • **Turn off training on your data** where your plan allows it, and confirm the setting covers the whole account.
  • **Ask about shorter retention** for health, financial or identity data, where the provider offers it.
  • **Set retention for your own copies:** logs, conversation history, caches and search indexes. A file deleted from its source can live on in a vector index.
  • **Make deletion reach everywhere.** A customer's deletion request must reach the conversation store, the logs, the index and any copies the vendor holds.
  • **Know where data is processed.** Some sectors and countries restrict where certain data may be stored or sent. This is awareness, not legal advice: confirm what applies with qualified counsel.

Vendor and platform settings: check them, do not assume them

Many incidents trace back to a setting nobody changed. Before launch, go through the admin console of every AI service and automation platform involved:

  • single sign-on and [multi-factor authentication](/glossary/multi-factor-authentication) for every administrator;
  • separate keys per environment and per agent, each with a spending limit;
  • roles inside the platform, so people who build workflows cannot read production data they do not need;
  • the training, retention and region settings described above;
  • an audit log of admin changes that someone actually reviews;
  • which models and versions are in use, and whether the vendor can change them without notice.

If you are still choosing the vendor, start with the [questions to ask before you buy an AI tool](/blog/questions-to-ask-ai-vendors).

The kill switch: stop the agent in seconds, not hours

  • **A switch per agent and per tool.** Turning off the refund tool while the agent keeps answering questions is often better than turning everything off.
  • **A fallback path.** When the agent is off, requests go to a human queue or receive a holding reply. They do not vanish.
  • **Revocation ready.** Know how to revoke the agent's tokens and keys quickly, and who is allowed to do it.
  • **A one-page runbook:** who decides, how to tell staff and customers, how to find and reverse the actions taken, and how to restart safely.
  • **A rehearsal.** Pull the switch in a test before launch and time it. A switch nobody has tried is a hope, not a control.

These checks sit on top of the usual security work: a [threat model](/services/cybersecurity/threat-modelling) of the agent's tools and data flows, secure code review and testing. How we approach that work for agents is described under [AI application security](/services/ai-automation/ai-security).

A small first step

Send us your next security questionnaire

Share the questionnaire or security review a buyer sent you. On a short call we show which answers you already have evidence for, which gaps to fix first, and what can be automated next time.

Message us on WhatsApp

Keep reading

Ready to build something secure?

Tell us about your product. We will reply with a clear plan.

Start a project

We would like to use Microsoft Clarity to see how visitors use the site, so we can improve it. It sets cookies and is off unless you accept. Cookie policy