Adversarial testing playbook
Instructions for an AI agent that attacks your own software with permission. Safe rules of engagement, then the checks that prove each security control holds.
- Required 3
- Recommended 13
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.
Start with Rules of engagement, because they keep the test safe and legal. Each later chapter lists the security controls to prove, by rule ID. The check of each control is its attack procedure.
The controls themselves, and how to build them, live in the Application security playbook, mapped to OWASP ASVS 5.0. A few live in the playbook that owns their subject, such as payments, APIs or AI features. Report each finding against the control's rule ID.
Chapters
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.
- Required 3
- Recommended 5
Injection
Proves the injection controls hold. Run the check of each listed control on the staging copy and record a pass or a finding for each one.
- Recommended 1
Access and accounts
Proves the sign-in, token, session and permission controls hold. Run the check of each listed control on the staging copy with test accounts.
- Recommended 1
Data and secrets
Proves the secret, error, encryption and configuration controls hold. Run the check of each listed control on the staging copy and its code.
- Recommended 1
Requests and files
Proves the controls on fetched addresses, uploads, paths, origins, caches and browser headers hold. Run each listed check on the staging copy.
- Recommended 1
Abuse and limits
Proves the rate limits, size limits and server-side business rules hold. Run the check of each listed control on the staging copy only.
- Recommended 1
Supply chain and setup
Proves the build, its inputs and its releases are locked. Run the check of each listed control against the repository, the CI and the latest release.
- Recommended 1
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.
- Recommended 2
This is a lot to check. An Expert can check it for you.
Related playbooks
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/adversarial-testing">Agent Wranglers adversarial testing playbook</a>. In code you write, add a comment next to it with the same link.