---
title: "Security testing playbook · Agent Wranglers"
url: https://agentwranglers.se/playbook/adversarial-testing
updated: 2026-10-20
licence: "All rights reserved"
---

# Adversarial testing playbook

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

An adversarial testing playbook for any website, API or AI agent. It turns an AI agent into a careful attacker of your own software, with your written permission.

Each rule names a security hole and how to close it. Its check is the attack the agent runs to prove the hole is closed. Start with [Rules of engagement](https://agentwranglers.se/playbook/adversarial-testing/rules-of-engagement), because they keep the test safe and legal.

The rules follow the common lists of security risks, such as the OWASP Top 10 for web apps, APIs and AI models. The OWASP Application Security Verification Standard (ASVS) lists the same controls in more detail. Headers and HTTPS for websites are in the [website security chapter](https://agentwranglers.se/playbook/website/security).

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers security testing playbook: https://agentwranglers.se/playbook/adversarial-testing`.

## Chapters

1. [Rules of engagement](https://agentwranglers.se/playbook/adversarial-testing/rules-of-engagement): Test only what you own or have written permission to test. Agree the scope, use a copy of the system, and stop when harm is possible. (7 required)
2. [Injection](https://agentwranglers.se/playbook/adversarial-testing/injection): Keep data and code apart. Untrusted input must never become part of a query, a page, a shell command, a template or a header. (8 required)
3. [Access and accounts](https://agentwranglers.se/playbook/adversarial-testing/access-and-accounts): Check on the server who is asking and what they may do, on every request. Make accounts hard to guess, steal or take over. (14 required, 1 recommended)
4. [Data and secrets](https://agentwranglers.se/playbook/adversarial-testing/data-and-secrets): Keep keys out of code and pages. Show short errors, close debug doors and hidden files, and send back only the data each request needs. (11 required)
5. [Requests and files](https://agentwranglers.se/playbook/adversarial-testing/requests-and-files): Stop the server fetching addresses an attacker picks, check every uploaded file, keep file paths inside their folder, and limit redirects and sharing. (9 required)
6. [Abuse and limits](https://agentwranglers.se/playbook/adversarial-testing/abuse-and-limits): Limit how fast and how much anyone can ask for. Give the same answer either way, and check every price, step and count on the server. (6 required, 2 recommended)
7. [Supply chain and setup](https://agentwranglers.se/playbook/adversarial-testing/supply-chain-and-setup): Most attacks walk in through someone else's code or a forgotten setting. Pin what you use, keep it current and give every account only what it needs. (9 required, 3 recommended)
8. [AI agents and models](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models): Attacks on your own AI features. Prompt injection, leaked data, tools that do too much, poisoned memory and runaway costs, with the test for each. (15 required, 3 recommended)
9. [Hostile agents and bots](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots): AI agents and bots attack sites at scale. Verify who an agent is, limit scraping, mark what users wrote and keep agent actions reversible. (2 required, 2 recommended)

See all 92 rules on one page in the [checklist](https://agentwranglers.se/playbook/adversarial-testing/checklist).
