---
title: "Write abuse cases next to user stories · Agent Wranglers"
url: https://agentwranglers.se/playbook/application-security/threat-modelling/abuse-cases
id: APS-95
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 860
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Write abuse cases next to user stories

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

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

- ID: APS-95
- Level: Recommended
- Chapter: [Threat modelling](https://agentwranglers.se/playbook/application-security/threat-modelling.md)
- Rule: For 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.
- Check: A script reads the tickets merged in the last release that carry a sensitive label. Each links at least one abuse case, and each abuse case names a test that exists and passes.
- How: An abuse case is a user story told by an attacker or a careless user. "As a shopper, I apply a coupon" gets "As a shopper, I apply the same single-use coupon from two tabs at once". Write it in the same ticket, with the expected safe result. Turn it into an automated test before the feature ships, as [Turn every fix into a check](https://agentwranglers.se/playbook/adversarial-testing/rules-of-engagement/fix-becomes-check.md) does for findings. Use the STRIDE line from the threat file to find cases you would miss.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
test('abuse case: one single-use coupon redeemed from two tabs at once works once', async () => {
  const results = await Promise.all([redeem(cart, 'WELCOME10'), redeem(cart, 'WELCOME10')]);
  assert.equal(results.filter(r => r.ok).length, 1);
});
```

### Python example

```python
def test_abuse_case_single_use_coupon_from_two_tabs_works_once(client, cart):
    with ThreadPoolExecutor() as pool:
        results = list(pool.map(lambda _: redeem(client, cart, "WELCOME10"), range(2)))
    assert sum(r.ok for r in results) == 1
```

## Sources

- [OWASP Abuse Case Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Abuse_Case_Cheat_Sheet.html)

## Related rules

- APS-1 [Plan attacks before building](https://agentwranglers.se/playbook/application-security/threat-modelling/threat-model.md) in Application security
- SEC-7 [Turn every fix into a check](https://agentwranglers.se/playbook/adversarial-testing/rules-of-engagement/fix-becomes-check.md) in Adversarial testing

**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/threat-modelling/abuse-cases">Agent Wranglers application security playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Find threats at every boundary with STRIDE and LINDDUN](https://agentwranglers.se/playbook/application-security/threat-modelling/stride-and-linddun.md)
- Next: [Pick an ASVS level for each app](https://agentwranglers.se/playbook/application-security/threat-modelling/asvs-level.md)
- [Threat modelling](https://agentwranglers.se/playbook/application-security/threat-modelling.md)
