Threat modelling
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.
- Recommended 5
Recommended
Plan attacks before building
APS-1Write a threat model before building a change that touches money, accounts, personal data or a new outside connection. A second person reviews it before the change can merge.
Draw the data flows and their trust boundaries
APS-93Keep a data-flow diagram for each app in the repository. It shows every process, data store, outside party and flow, and a line wherever trust changes.
Find threats at every boundary with STRIDE and LINDDUN
APS-94For every element and boundary crossing in the data-flow diagram, ask each STRIDE question. Where the flow carries personal data, also ask each LINDDUN question. Record every threat with a decision.
Write abuse cases next to user stories
APS-95For each user story that touches money, accounts, personal data or a new outside connection, write at least one abuse case. It says how someone could misuse the feature and what the app must do instead.
Pick an ASVS level for each app
APS-96Choose an OWASP ASVS 5.0 level for each app and write it in the repository. Check the app against every requirement of that level before each major release.
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/threat-modelling">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.