Application security checklist
Every rule in the application security playbook, by chapter, required rules first. Each links to its own page with how we built it and how to check it. This is a lot to check. An Expert can check it for you.
Threat modelling
- Recommended APS-1 Plan attacks before building
- Recommended APS-93 Draw the data flows and their trust boundaries
- Recommended APS-94 Find threats at every boundary with STRIDE and LINDDUN
- Recommended APS-95 Write abuse cases next to user stories
- Recommended APS-96 Pick an ASVS level for each app
Input and injection
- Required APS-2 Use parameterised queries
- Required APS-97 Keep query operators out of document database input
- Required APS-3 Escape everything you show
- Required APS-4 Never pass input to a shell
- Required APS-5 Keep input out of templates
- Required APS-7 Turn off external entities in XML
- Required APS-8 Never rebuild objects from untrusted data
- Recommended APS-6 Strip line breaks from headers and logs
- Recommended APS-9 Block prototype pollution
- Recommended APS-98 Escape input in directory queries
- Recommended APS-99 Neutralise formulas in spreadsheet exports
Authentication and sessions
- Required APS-10 Slow down password guessing
- Required APS-11 Store passwords with a slow hash
- Required APS-12 Verify every token
- Required APS-15 Trust an email domain only after strict parsing
- Required APS-16 Lock down session cookies
- Required APS-17 Set cookies safely or not at all
- Required APS-18 Block cross-site form posts
- Required APS-19 Clear cached pages and data when someone signs out
- Recommended APS-13 Compare secrets in constant time
- Recommended APS-14 Make tokens from a secure random source
Access control
- Required APS-20 Deny by default and when a check fails
- Required APS-21 Accept only the fields you expect
- Recommended APS-101 Decide access in one policy module
- Recommended APS-22 Return only the fields needed
Browser security headers
- Required APS-23 Make browsers always use HTTPS
- Required APS-28 Refuse to be framed
- Recommended APS-100 Send the security headers as one set
- Recommended APS-24 Load nothing over plain HTTP
- Recommended APS-25 Allow only the scripts you wrote
- Recommended APS-26 Collect reports of blocked content
- Recommended APS-27 Stop browsers guessing file types
- Recommended APS-29 Refuse odd requests from other sites
- Recommended APS-30 Keep other sites' windows apart
- Recommended APS-31 Share less in the Referer header
- Recommended APS-32 Switch off browser features you don't use
- Recommended APS-33 Lock scripts to a known hash
- Recommended APS-35 Lock down risky DOM writes
- Recommended APS-37 Share data across sites on purpose
- Recommended APS-38 Check the origin of WebSocket connections
- Recommended APS-39 Check the sender of every window message
- Recommended APS-40 Redirect only to your own pages
- Optional APS-34 Send a hash of the body
- Avoid APS-36 Sending the old XSS filter header
Requests, files and caches
- Required APS-41 Fetch only allowed addresses
- Required APS-43 Check every uploaded file
- Required APS-44 Keep file paths inside their folder
- Required APS-46 Keep private pages out of shared caches
- Recommended APS-42 Treat data from other APIs as untrusted
- Recommended APS-45 Unpack archives safely
- Recommended APS-47 Keep unkeyed headers from changing cached pages
- Recommended APS-48 Make every server agree where a request ends
Limits and business logic
- Required APS-49 Limit how often anyone can call your APIs
- Required APS-50 Take the client address only from proxies you run
- Required APS-51 Keep regular expressions from stalling the server
- Required APS-52 Work out every amount on the server
- Required APS-53 Make each change happen exactly once
Cryptography and keys
- Required APS-54 Encrypt data on the wire and on disk
- Required APS-102 Renew certificates automatically
- Recommended APS-55 Turn off old encryption
- Recommended APS-56 Use only standard cryptography
- Recommended APS-57 Keep encryption keys in a key service
- Recommended APS-103 Wrap data keys with a key-encryption key
- Recommended APS-58 Encrypt the most sensitive fields
- Recommended APS-59 Prepare your encryption for quantum computers
Secrets and configuration
- Required APS-60 Keep secrets out of code
- Required APS-61 Keep secrets out of the browser
- Required APS-63 Keep storage buckets private
- Required APS-64 Close debug and admin doors
- Recommended APS-62 Give each key the least power
- Recommended APS-65 Serve no hidden files
- Recommended APS-66 Remove defaults and samples
- Recommended APS-67 Keep software current and quiet
- Recommended APS-68 Remove DNS records you no longer use
Supply chain
- Required APS-69 Lock and audit dependencies
- Required APS-74 Keep secrets out of builds from strangers
- Recommended APS-70 Review every new package
- Recommended APS-71 Keep the dependency tree small
- Recommended APS-72 Wait a few days before taking new releases
- Recommended APS-73 Fetch private packages only from your own registry
- Recommended APS-75 Publish what is in each release
- Recommended APS-76 Treat a machine that installed a bad package as breached
- Recommended APS-77 Use models and data from trusted sources
- Recommended APS-104 Build releases at SLSA Build Level 2 or higher
- Recommended APS-105 Verify signatures and provenance before you install or deploy
- Recommended APS-106 Say which known holes do not affect you with VEX
Errors, logs and vulnerabilities
- Recommended APS-78 Show short errors
- Recommended APS-79 Keep private data out of logs and addresses
- Recommended APS-80 Log attacks without personal data
- Recommended APS-81 Fix each finding within the time its severity allows
- Recommended APS-107 Publish a vulnerability disclosure policy
- Recommended APS-108 Keep a security incident runbook and rehearse it
AI features and agents
- Required APS-84 Break the lethal trifecta
- Required APS-85 Give agent tools the least power they need
- Required APS-91 Run code the model writes in a sandbox
- Recommended APS-82 Resist direct prompt injection
- Recommended APS-83 Resist indirect prompt injection
- Recommended APS-86 Treat model output as untrusted
- Recommended APS-87 Keep secrets out of the system prompt
- Recommended APS-88 Protect agent memory
- Recommended APS-89 Send models only the private data they need
- Recommended APS-90 Keep a switch that turns the agent off
- Recommended APS-92 Lock local agent servers to your own machine
Related playbooks
Show the badge on your project
When your project passes every Required rule, you can show this badge on your site or in your README. It links to this checklist, so anyone can run the same checks.
<a href="https://agentwranglers.se/playbook/application-security/checklist"><img src="https://agentwranglers.se/badge.svg" alt="Checked against the Agent Wranglers application security playbook" width="214" height="20"></a>
[](https://agentwranglers.se/playbook/application-security/checklist)
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/application-security/checklist">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.