Help us improve
Share bugs, ideas, or general feedback.
From appsec
Analyzes business logic for security flaws including workflow bypassing, negative amount exploits, coupon/discount abuse, self-referral, state manipulation, and time-based exploits.
npx claudepluginhub florianbuetow/claude-code --plugin appsecHow this skill is triggered — by the user, by Claude, or both
Slash command
/appsec:business-logicThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze application business logic for security vulnerabilities including
Business logic vulnerability testing methodology for web/mobile/API engagements. Covers workflow bypass, state machine violations, price manipulation, race conditions, and parameter tampering. Use after OWASP Top 10 for transactional, fintech, or e-commerce apps.
Identifies business logic flaws enabling price manipulation, workflow bypass, and privilege escalation during authorized penetration tests.
Identifies business logic flaws in web apps allowing price manipulation, workflow bypass, and privilege escalation during authorized penetration tests beyond automated scanners.
Share bugs, ideas, or general feedback.
Analyze application business logic for security vulnerabilities including workflow step bypassing, negative amount manipulation, coupon/discount abuse, self-referral exploitation, state machine manipulation, and time-based logic exploits. Business logic flaws are unique to each application and cannot be detected by generic scanners -- they require understanding the intended workflow and finding ways to subvert it.
Read ../../shared/schemas/flags.md for the full flag specification. This skill
supports all cross-cutting flags. Key flags for this skill:
--scope determines which files to analyze (default: changed)--depth standard reads code and checks business rule implementations--depth deep traces full workflows from initiation through completion--severity filters output (business logic issues are often high or critical)Key CWEs in scope:
Read references/detection-patterns.md for the full catalog of code patterns,
search heuristics, language-specific examples, and false positive guidance.
Parse flags and resolve the file list per ../../shared/schemas/flags.md.
Filter to files likely to contain business logic:
**/payments/**, **/checkout/**, **/billing/**)**/orders/**, **/cart/**, **/transactions/**)**/coupons/**, **/discounts/**, **/promotions/**)**/referrals/**, **/rewards/**, **/loyalty/**)**/workflows/**, **/state/**, **/status/**)**/accounts/**, **/profiles/**)Detect scanners per ../../shared/schemas/scanners.md:
semgrep -- custom rules can catch some business logic patternsRecord which scanners are available. Business logic flaws are primarily detected through manual code analysis, not automated scanners.
If semgrep is available, run with rules targeting business logic:
semgrep scan --config auto --json --quiet <target>
Filter for rules matching validation, state management, and numeric handling patterns. Normalize output to the findings schema.
This is the primary detection method for business logic flaws:
When --depth deep, additionally trace:
Format output per ../../shared/schemas/findings.md using the BIZ prefix
(e.g., BIZ-001, BIZ-002).
Include for each finding:
These are the high-signal patterns specific to business logic security. Each
maps to a detection pattern in references/detection-patterns.md.
Workflow step bypass -- Multi-step processes where a later step can be invoked directly without completing prior steps.
Negative amount manipulation -- Numeric inputs accepted without sign validation, allowing negative amounts to reverse charges or increase balances.
Coupon/discount abuse -- Discount codes applied multiple times, stacked beyond intended limits, or used on ineligible items.
Self-referral exploitation -- Referral reward systems that do not prevent users from referring themselves or creating fake referral chains.
State machine manipulation -- Invalid state transitions accepted by the system (e.g., marking an order as "delivered" before "shipped").
Time-based logic exploits -- Logic dependent on client-supplied timestamps, exploitable timezone handling, or deadline race conditions.
Price manipulation -- Client-supplied prices accepted without server-side verification against the product catalog.
Quantity abuse -- No limits on quantities enabling abuse (ordering negative quantities, exceeding stock, zero-quantity orders).
| Scanner | Coverage | Command |
|---|---|---|
| semgrep | Numeric validation, some state patterns | semgrep scan --config auto --json --quiet <target> |
Fallback (no scanner): Business logic flaws require manual code analysis.
Use Grep with patterns from references/detection-patterns.md to find
financial operations, state transitions, discount logic, and referral systems.
Report findings with confidence: medium.
Use the findings schema from ../../shared/schemas/findings.md.
BIZ (e.g., BIZ-001)business-logicspecializedBIZCWE-840, CWE-841A04:2021 (Insecure Design)T (Tampering) or E (Elevation of Privilege)Severity guidance for this category: