business-logic-testing

business-logic-testing is a cursor rule for Cursor from briiirussell/cybersecurity-skills. It costs 177 tokens per session (3,942 once invoked), scanned A, original, MIT.

A method for testing an authorized web application for business-logic bugs and race conditions, where concurrent or carefully ordered actions break rules the application should enforce.

In plain words
What is it for?
Use it to model rules such as uniqueness or value conservation, map which actors can perform which actions on which resources, and test state changes safely in an approved environment.
Why use it?
It looks for flaws that ordinary security scanners miss, such as using the same resource twice, skipping required steps, or changing value during simultaneous requests.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to model rules such as uniqueness or value conservation, map which actors can perform which actions on which resources, and test state changes safely in an approved environment.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/briiirussell/cybersecurity-skills/business-logic-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/briiirussell/cybersecurity-skills

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for business-logic-testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/business-logic-testing/github.svg)](https://agentmods.dev/rules/briiirussell/cybersecurity-skills/business-logic-testing)
Your own site
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/business-logic-testing"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/business-logic-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for business-logic-testing

Your own site · 80×15
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/business-logic-testing"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/business-logic-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,942 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00177 $0.03942
Opus 5.5 $0.00071 $0.01577
Sonnet 5.5 $0.00035 $0.00788
Haiku 4.5 $0.00018 $0.00394

Measured today against content hash 0f75515c8ca9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

business-logic-testing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Tooling, a worked Turbo Intruder config, and a minimal `httpx`/`curl --parallel` runner are in [references/concurrency.md](references/concurrency.md) — all scoped to authorized-test use and the agreed request cap.
adapters/cursor/business-logic-testing.mdc · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 Refusal 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.

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 175 lines · 177 tokens per session scan A 0f75515c8ca9

Subscribe to this mod's changes

business-logic-testing is a cursor rule published in the GitHub repository briiirussell/cybersecurity-skills (435 stars, last pushed today), licensed MIT. It adds 177 tokens to every session and 3,942 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.