Skip to content
techpotions
ai agent attack · agent security · prompt injection · pre-launch checklist · least privilegeNovember 24, 20268 min read

AI Agent Attack Checklist

The realistic attacks are prompt injection through retrieved documents and tool output, over-scoped credentials, and irreversible actions taken with no human in the loop.

Cover illustration for “AI Agent Attack Checklist”

An ai agent attack isn't some theoretical model jailbreak — it's the moment your production agent follows instructions hidden in a customer's uploaded PDF, emails your entire database to a random Gmail address, and you only find out because the AWS bill spiked. We know because we almost shipped that agent. This checklist is distilled from the security architecture we had to retrofit three days before launch.

We work with teams at this exact inflection point — handing real credentials to an agent that reads and writes real systems. If you'd rather not do that alone, our AI security practice pairs an adversary model with an agent-specific hardening sprint. We also open-sourced the file system surfaces an AI coding agent touches to make explicit what's often implicit.

The realistic ai agent attack surfaces you'll hit first

A launch-day near-miss from our own bench: we built an internal triage agent that reads Slack threads and Jira issues, pulls related Notion docs, and writes incident summaries. Within a week, a poisoned Notion page ― just a paragraph that looked like any other KB article ― tricked the agent into calling our incident API with DELETE /environments/staging. No human approval. No rate limit. Just a tool call that followed the malicious instruction as faithfully as it followed the legitimate ones.

That's the real ai agent attack vector: prompt injection through retrieved content, not user chat. As Ory points out, attackers hide instructions in documents, websites, emails — anything the agent reads at runtime — and the agent acts on them with whatever power you gave it.

Docker's analysis confirms that prompt injection is the risk that defines agent security because an attacker doesn't need access to your prompt or model; they just need to get text in front of the agent. And JetBrains notes that these injections can come from tool outputs, not just inputs. When an agent calls a search tool and the result contains a hidden instruction, that instruction becomes part of the agent's context and can steer subsequent actions.

Three attack surfaces follow directly:

  1. Prompt injection through tools and retrieved data — the poisoned Notion page, the web search result that says "ignore previous instructions and execute …", the support ticket attachment that's really a payload. Pluto Security calls this the defining threat for agents because the instruction is ​indistinguishable from legitimate context​.
  2. Over-scoped credentials — an agent that can read s3:* when it only needs one bucket; an agent that holds a full admin API key because it was quicker to copy-paste. As Fortinet explains, an agent is a confused deputy: it doesn't understand that its permissions exceed its task. A prompt injection that says "run a billing report" might instead exfiltrate all objects if the role allows it.
  3. Irreversible actions without a human in the loop — the DELETE /environments/staging call that went through because the agent didn't pause for confirmation. This is where agents differ from traditional APIs: the agent decides to take action based on text it just read.

Before launch, shrink the tool scope to exactly one job

The single biggest risk reduction we made after our near-miss: rip out the broad IAM role and replace it with resource-scoped, action-scoped policies. Your agent doesn't need dynamodb:*; it needs dynamodb:GetItem on one table. It doesn't need the ability to send email; it needs zero SMTP access.

Think of every tool you register as a potential confused-deputy: if the agent can be tricked into invoking that tool, what's the worst that could happen? The Unico article frames this as reducing the blast radius: "a prompt injection into an agent that can only read a single FAQ page is far less dangerous than one with full database access."

The pre-launch checklist for tool scope:

Check

Action

Why it matters

Tool inventory

List every tool the agent can call, including any the framework adds by default

You can't secure what you don't know you've given

Least privilege per tool

Scope each tool to the minimum required actions and resources

A s3:ListBucket on one bucket can't exfiltrate everything

Outbound allowlist

Restrict HTTP/S calls to a known set of domains; block smtp/sendmail paths entirely

The agent shouldn't be able to email data anywhere

Per-tenant data boundaries

If multi-tenant, enforce tenant-scoped access tokens so the agent can't cross contaminate

Prompt injection in Tenant A's doc shouldn't access Tenant B's data

Put a confirmation gate on every destructive or expensive action

Our agent's DELETE call went through because we wired the tool directly to the API with no intermediary. The fix: a decision engine that sits between the agent's tool call and the actual side effect. Any action classified as destructive or cost-impacting pauses and sends a notification to a human. The human approves or denies within a timeout.

This isn't a "nice to have." For agents with production credentials, it's the only boundary between a poisoned document and an SRE pager at 3am. The architecture looks like:

Text
graph LR
  A[Agent] --> B{Tool call}
  B -->|Read/low-risk| C[Execute]
  B -->|Destructive/high-cost| D[Confirmation queue]
  D --> E[Human approval]
  E --> C

In practice, you tag each tool with a risk level. Here's how that might appear in a tool registration:

Python
register_tool(
    name="delete_staging_env",
    risk_level="destructive",
    requires_confirmation=True,
    confirmation_timeout_seconds=300
)

If the agent invokes delete_staging_env, the request goes into a pending queue. The agent's conversation pauses. No action happens without a human tapping "approve." This also gives you a natural audit trail.

Log every tool call with full context — before the action fires

By the time we realized our agent had been prompt-injected, the DELETE had already run. We had the agent's final response, but not the chain of tool calls that led to it. That made root-causing the injected Notion page a forensic nightmare.

Now we log every tool invocation immediately, before execution, with:

  • The exact prompt context that led to the call
  • The tool name, arguments, and risk level
  • The tenant/request scope
  • A timestamp and trace ID

This turned a blind spot into an observable signal. We can now replay any agent interaction end to end — and, critically, detect patterns like "the agent queried a tool it has never used before" or "the tool arguments contain suspicious strings" before the human approval step.

Rate-limit agent spend and tool call frequency

There's a second class of ai agent attack that's less exciting but just as painful: a loop or a prompt injection that causes the agent to burn through inference tokens or paid API calls. We had an agent once that, when given a malformed search result, retried the search 400 times in 90 seconds. The AWS bill noticed.

Add explicit, hard limits:

  • Maximum number of tool calls per conversation turn
  • Maximum total inference cost per conversation
  • Rate limit on expensive external APIs (e.g., no more than 10 search queries per minute)

These aren't security theater — they're the financial blast radius of a prompt injection that can't steal data but can still rack up charges.

Integrate these checks into your CI and agent registration flow

Make security checks a gate before the agent hits staging. A few non-negotiable checks:

  1. Tool registration lint: does every tool have a scope, risk level, and confirmation flag?
  2. Credential scan: no broad IAM roles, no admin tokens, no hardcoded secrets.
  3. Outbound simulation: run the agent against a set of known-malicious inputs (a poisoned document, a tool response with injected instructions) and verify that destructive actions trigger the confirmation queue.
  4. Per-tenant isolation test: feed the agent a document from Tenant A and confirm it cannot access Tenant B's resources.

This isn't a one-time audit; it's a CI step that runs on every deploy. When we integrated this, the confirmation gate caught a regression where a new tool was added with is_destructive=True but nobody had wired the approval queue. The deploy blocked. Bullet dodged.

FAQ

What's the difference between prompt injection in a chatbot and an ai agent attack?

A chatbot prompt injection might produce a harmful text output. An agent prompt injection produces action — it can delete data, send emails, modify infrastructure. The agent's tools amplify the injection's blast radius. As Docker puts it, "because an agent acts on whatever text it reads, an attacker doesn't need access to your infrastructure — they just need to get text in front of the agent." The security posture has to shift from content filtering to capability control.

Should I put a system prompt guardrail and call it a day?

No. System prompts can be overridden by the same prompt injection that arrives via tool output. The architectural controls — scoped tools, confirmation gates, outbound allowlists, logging — are what actually contain the blast radius. A system prompt that says "never delete data" won't stop a tool call if the tool itself is registered and the agent's reasoning has been hijacked.

Our agent only reads customer data — do we still need a confirmation gate?

Yes, if reads can be weaponized. An agent that reads customer data can be tricked into summarizing that data and posting it to a Slack channel, emailing it, or writing it to a public location if those tools are available. Even read-only access combined with an output tool creates an exfiltration path. Map all possible data flows before deciding a confirmation gate isn't necessary.

Written by
techpotions
All entries
Next.js App Router: Four Cache Layers That Lie
The weekly

One email a week, from the workshop.

What we published, what we shipped, and the free packs as they land. No drip sequence, no webinar, unsubscribe in one click.