Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Business Logic Security Testing

Finds logic flaws and race conditions in a web app you may test, such as double spends and coupon reuse.

Claude's review

8/10 Rigorous invariant-first method for business logic and race testing with strong authorisation gates and a durable-state evidence bar.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Test an authorized web application for business-logic flaws and race conditions — the classes scanners cannot find. Model invariants (conservation of value, uniqueness, monotonicity, exclusivity), build an Actor x Action x Resource matrix, abuse state machines (skip/reorder/replay steps, limit-slicing), find numeric bugs (float-vs-decimal rounding, cross-currency refund arbitrage, negative amounts), stale feature gates, and saga gaps; prove concurrency bugs (double-spend, lost update, idempotency-key reuse) with controlled parallel requests. Use when the user mentions 'business logic testing,' 'race condition,' 'double spend,' 'TOCTOU,' 'concurrency bug,' 'idempotency,' 'coupon reuse,' 'workflow bypass,' 'limit bypass,' 'negative amount,' 'refund arbitrage,' 'parallel request attack,' or 'logic flaw.'

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: business-logic-testing
description: "Test an authorized web application for business-logic flaws and race conditions — the classes scanners cannot find. Model invariants (conservation of value, uniqueness, monotonicity, exclusivity), build an Actor x Action x Resource matrix, abuse state machines (skip/reorder/replay steps, limit-slicing), find numeric bugs (float-vs-decimal rounding, cross-currency refund arbitrage, negative amounts), stale feature gates, and saga gaps; prove concurrency bugs (double-spend, lost update, idempotency-key reuse) with controlled parallel requests. Use when the user mentions 'business logic testing,' 'race condition,' 'double spend,' 'TOCTOU,' 'concurrency bug,' 'idempotency,' 'coupon reuse,' 'workflow bypass,' 'limit bypass,' 'negative amount,' 'refund arbitrage,' 'parallel request attack,' or 'logic flaw.'"
allowed-tools: Read, Grep, Glob
---

# Business Logic Testing — Invariants, State-Machine Abuse, Race Conditions

The vulnerability classes scanners cannot find. A scanner matches syntax; a logic flaw is a mismatch between what the app *is supposed to guarantee* and what its code actually enforces under adversarial or concurrent use. This skill is the dynamic counterpart to `owasp-audit`'s source-side race patterns (TOCTOU, atomic queue claim, reserve-then-act) and the depth behind `web-pentest` Phase 8.

Work invariant-first: name the guarantee, then try to break it. A finding is not "I sent a weird request" — it is "I violated a stated invariant and proved durable state changed."

## Authorization Check

Concurrency and logic testing mutates real state. Before sending anything:

1. Written authorization naming this specific application and that **business-logic and concurrency testing** are in scope.
2. **Prefer a staging or test-mode environment.** Use payment test mode (e.g. Stripe test keys), seeded test tenants, and disposable accounts you own. Never exercise a production money flow, inventory ledger, or third-party billing API unless the written scope explicitly names it.
3. A **request-count cap** agreed in advance. Concurrency proofs need tens of parallel requests, not thousands — name the ceiling and stay under it.
4. Accounts you control for every role and tenant you will test (owner, non-owner, admin, two tenants).

If any of these is missing, stop and ask. See **Boundaries** below.

Sending live requests is deliberately outside this skill's pre-approved tools (`Read, Grep, Glob` only) — the human runs the parallel requests, or approves each tool invocation, so a throughput test never fires unattended.

## Step 1 — Model the invariants

Before touching a request, write down what the system promises. Four families cover most money and workflow bugs:

- **Conservation of value.** Money, credits, points, inventory, and quota are neither created nor destroyed except through an authorized path. A $10 refund must remove exactly $10 of credit; redeeming a coupon must decrement its remaining uses.
- **Uniqueness.** A coupon redeems once per rule; a username, invite, or idempotency key is claimed by exactly one principal; an order is fulfilled once.
- **Monotonicity.** Some counters only move one way — a used voucher never returns to unused, a shipped order never returns to pending, a consumed one-time token never re-validates.
- **Exclusivity.** A seat, a lock, a lease, or a "pending approval" row is held by one actor at a time; two parties cannot both own the same mutually-exclusive resource.

For each invariant, note **where it is enforced** (a DB unique constraint? an application `if`? only the UI?) and **what proves a violation** (a ledger that no longer sums to zero, two rows where one should exist). An invariant enforced only in the UI or only in a single handler is the lead.

## Step 2 — Actor x Action x Resource matrix

Enumerate the grid and look for the cells the app forgot:

...

From briiirussell's repository, MIT licence.

Related skills

  • Checked

    Codebase quality audit

    Audits a whole code repo for bugs, security holes, slow paths and dead code, ranked in plain English.

    by DietrichGebert 203k
    7/101 credit
  • Checked

    Security and CVE audit

    Runs a security and CVE audit on code in any language and scores it out of 100, with false alarms filtered.

    by opencrabs 1k
    7/101 credit
  • Checked

    OWASP code review

    Reviews code for security flaws using the latest OWASP Top 10 lists, including those for AI and agent apps.

    by agamm 467
    7/101 credit
  • Checked

    Pull request security review

    Reviews one pull request for exploitable security holes only, filtering out false positives before reporting.

    by EricTechPro 771
    7/101 credit
  • Checked

    Code security hardening

    Hardens code that handles user input, logins and data against the OWASP Top 10, starting from a threat model.

    by addyosmani 122k
    8/101 credit
  • Checked

    Security incident response

    Runs a security incident from detection to closure, including containment, communication and the review after.

    by cbrock84 2.6k
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added