---
title: "Application security playbook · Agent Wranglers"
url: https://agentwranglers.se/playbook/application-security
parts: 13
tokens_total: 18939
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1785
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Application security playbook

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Playbook](https://agentwranglers.se/playbook.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

An application security playbook for any website, API or app with a server. It lists the controls you build in, so that common attacks fail. Each rule says what to build, how to build it and how to check that it holds.

The rules follow the OWASP Application Security Verification Standard (ASVS) 5.0. The [ASVS 5.0 mapping](https://agentwranglers.se/playbook/application-security/asvs-5-0-mapping.md) names the ASVS requirements behind each rule. Pick a target level first, as [Pick an ASVS level for each app](https://agentwranglers.se/playbook/application-security/threat-modelling/asvs-level.md) says. Most business apps aim for level 2.

This playbook owns the controls. The [Adversarial testing playbook](https://agentwranglers.se/playbook/adversarial-testing.md) holds the attacks that prove each control holds, with the rules for testing safely. Sign-up, sign-in methods, recovery and roles live in the [Accounts and identity playbook](https://agentwranglers.se/playbook/accounts.md), and the [Infrastructure playbook](https://agentwranglers.se/playbook/infrastructure.md) covers cloud access and networks.

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/application-security">Agent Wranglers application security playbook</a>`. In code you write, add a comment next to it with the same link.

## Chapters

1. [Threat modelling](https://agentwranglers.se/playbook/application-security/threat-modelling.md) · 5 rules · 830 tokens · updated 2026-10-27
   Draw how data flows and mark where trust changes. List what could go wrong at each step, and turn each threat into a test before you build.
2. [Input and injection](https://agentwranglers.se/playbook/application-security/input-and-injection.md) · 11 rules · 1,545 tokens · updated 2026-10-27
   Keep data and code apart. Untrusted input must never become part of a query, a page, a shell command, a template, a file or a header.
3. [Authentication and sessions](https://agentwranglers.se/playbook/application-security/authentication-and-sessions.md) · 10 rules · 1,638 tokens · updated 2026-10-27
   Slow down guessing, store passwords safely, verify every token and keep session cookies locked to your own site and to the signed-in person.
4. [Access control](https://agentwranglers.se/playbook/application-security/access-control.md) · 4 rules · 711 tokens · updated 2026-10-27
   Check on the server, on every request, who is asking and what they may touch. Deny by default and decide access in one place for every route.
5. [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md) · 19 rules · 2,678 tokens · updated 2026-10-27
   HTTPS, a strict Content Security Policy, isolation headers, integrity checks and origin checks that keep the browser from turning against visitors.
6. [Requests, files and caches](https://agentwranglers.se/playbook/application-security/requests-files-and-caches.md) · 8 rules · 1,200 tokens · updated 2026-10-27
   Stop the server fetching addresses an attacker picks, check every uploaded file, keep paths in their folder and keep private replies out of caches.
7. [Limits and business logic](https://agentwranglers.se/playbook/application-security/limits-and-business-logic.md) · 5 rules · 897 tokens · updated 2026-10-27
   Limit how fast and how much anyone can ask for. Check every price, step and count on the server, so each change happens exactly once.
8. [Cryptography and keys](https://agentwranglers.se/playbook/application-security/cryptography-and-keys.md) · 8 rules · 1,256 tokens · updated 2026-10-27
   Encrypt every connection and stored secret with standard algorithms, keep keys in a key service, renew certificates by machine and plan for quantum.
9. [Secrets and configuration](https://agentwranglers.se/playbook/application-security/secrets-and-configuration.md) · 9 rules · 1,304 tokens · updated 2026-10-27
   Keep keys out of code and pages and give each key the least power. Close debug doors and hidden files, and keep servers current and quiet.
10. [Supply chain](https://agentwranglers.se/playbook/application-security/supply-chain.md) · 12 rules · 1,831 tokens · updated 2026-10-27
   Most attacks walk in through someone else's code. Lock, review and wait for new packages, publish what each release holds and verify what you install.
11. [Errors, logs and vulnerabilities](https://agentwranglers.se/playbook/application-security/errors-logs-and-vulnerabilities.md) · 6 rules · 1,021 tokens · updated 2026-10-27
   Show short errors and log attacks without personal data. Publish how to report a hole, fix each one in time and know what to do in a breach.
12. [AI features and agents](https://agentwranglers.se/playbook/application-security/ai-features-and-agents.md) · 11 rules · 1,669 tokens · updated 2026-10-27
   Controls for the AI features you build. Enforce limits outside the model, keep private data, outside content and a way out apart, and sandbox code.

## Evidence

- [ASVS 5.0 mapping](https://agentwranglers.se/playbook/application-security/asvs-5-0-mapping.md) · 2,359 tokens · updated 2026-10-27
  Each rule in this playbook mapped to the OWASP Application Security Verification Standard 5.0 requirements it helps you meet, chapter by chapter.

See all 108 rules on one page in the [checklist](https://agentwranglers.se/playbook/application-security/checklist.md). This is a lot to check. [An Expert can check it for you](https://agentwranglers.se/contact.md).

## Related playbooks

- [Rules of engagement](https://agentwranglers.se/playbook/adversarial-testing/rules-of-engagement.md) in the Adversarial testing playbook. Prove each control holds by attacking a staging copy, with written permission and a scope file.
- [Sign-in methods](https://agentwranglers.se/playbook/accounts/sign-in-methods.md) in the Accounts and identity playbook. Passkeys, passwords and single sign-on decide how people prove who they are. This playbook covers the checks behind them.
- [Identity and access](https://agentwranglers.se/playbook/infrastructure/identity-and-access.md) in the Infrastructure and environments playbook. Cloud roles, short-lived credentials and networks keep a leaked key or a broken server from reaching everything else.
- [API security](https://agentwranglers.se/playbook/api-design/api-security.md) in the API design playbook. Authentication, scopes and rate limits for every endpoint, in the shape API clients expect.
- [Breaches and reporting](https://agentwranglers.se/playbook/compliance/breaches-and-reporting.md) in the Compliance and governance playbook. When a control fails, the reporting clocks start. Know who to tell and by when.
