Borrowing it
Nothing to install: this file belongs to zhaji2333/CkSKILLS. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zhaji2333/CkSKILLS/main/.agents/skills/business-logic-race/SKILL.mdgit clone --depth 1 https://github.com/zhaji2333/CkSKILLSWrote 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.
[](https://agentmods.dev/skills/zhaji2333/ckskills/business-logic-race)<a href="https://agentmods.dev/skills/zhaji2333/ckskills/business-logic-race"><img src="https://agentmods.dev/badge/skills/zhaji2333/ckskills/business-logic-race/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.
<a href="https://agentmods.dev/skills/zhaji2333/ckskills/business-logic-race"><img src="https://agentmods.dev/badge/skills/zhaji2333/ckskills/business-logic-race.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00094 | $0.01331 |
| Opus 5 | $0.00047 | $0.00665 |
| Sonnet 5 | $0.00019 | $0.00266 |
| Haiku 4.5 | $0.00009 | $0.00133 |
Grade A, and why
business-logic-race scanned grade A with 0 findings 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 13d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
business-logic-race — 业务逻辑与并发竞态专项深度挖掘
何时调用(触发条件)
- 支付流程:下单→支付→回调→发货→退款→提现
- 资金相关:金额、数量、折扣、优惠券、积分、余额、红包
- 状态流转:订单状态、审批状态、权益状态可被篡改/跳过
- 并发场景:库存扣减、优惠券领取、提现、转账、兑换
- 业务复杂:状态机不清晰、一致性校验位置不明
一、业务逻辑建模(先理解再测试)
原则:不理解业务就不可能发现业务逻辑漏洞。
测试任何功能前,必须先回答:
- 这个功能的完整状态机是什么?(所有状态+所有转换条件)
- 每个状态转换谁有权执行?(角色矩阵)
- 哪些转换不应该被允许?(非法路径)
- 数据在各环节的一致性校验在哪里做的?(前端/后端/数据库)
- 并发场景下会不会出问题?(竞态条件)
重点建模场景:
- 支付流程:下单→支付→回调→发货→退款→提现(每个箭头都是攻击点)
- 认证流程:注册→登录→找回密码→绑定→解绑(每个步骤的凭证传递)
- 权限模型:角色→权限→资源(每个绑定关系是否可篡改)
- 审批流程:提交→审核→通过/驳回(能否跳过/重放/篡改状态)
二、支付/资金类场景表(全景)
| 场景 | 漏洞类型 | 挖掘要点 |
|---|---|---|
| 商品下单 | 金额篡改/数量篡改 | 价格参数可控、负数/0元/小数精度 |
| 优惠券/积分/红包 | 无限领取/超额使用/叠加 | 并发领取、ID遍历、多券叠加 |
| 支付回调 | 签名绕过/金额不一致 | 回调验签缺失、金额未二次校验 |
| 退款流程 | 重复退款/超额退款 | 并发退款、退款金额可控 |
| 提现/转账 | 越权提现/金额篡改 | 提现账户可控、余额校验绕过 |
| 会员/订阅 | 越权开通/无限试用 | 会员等级可控、试用次数绕过 |
| 虚拟货币/积分 | 积分盗刷/负数充值 | 并发兑换、金额类型混淆 |
| 分销/返佣 | 自推自/刷单 | 邀请关系可控、返佣逻辑缺陷 |
三、业务逻辑漏洞攻击套路
支付类:
- 金额参数篡改(0.01、负数、小数精度)
- 优惠券/积分/余额叠加
- 订单状态跳变(未支付→已支付)
- 并发重放(多次到账)
- 退款不扣库存
权益类:
- 无限领取/次数限制绕过
- 试用→正式状态跳过
- 会员等级参数可控
流程类:
- 跳步(绕过前置节点)
- 重放(同一步骤多次执行)
- 状态回退/覆盖
四、并发与竞态专项
常见竞态场景
- 库存扣减:并发下单是否超卖
- 优惠券领取:并发领取是否多发
- 提现/转账:并发操作余额是否被重复扣
- 兑换:积分并发兑换是否重复到账
- 退款:并发退款是否超额
测试方法
- 同一请求并发发送(
xargs -P/ Burp Turbo Intruder / 脚本线程池) - 在关键操作(支付回调、发货、领券)同时重放请求
- 观察数据库/业务结果的最终一致性
修复方向
- 幂等键:请求唯一标识,重复请求直接返回
- 数据库约束:唯一索引、余额非负约束、乐观锁
- 分布式锁 / 事务隔离
- 服务端二次校验:回调金额与订单金额比对,状态校验原子化
五、验证要点
- 每个状态转换测试:正常路径、跳过、回退、重放、并发
- 数据一致性校验位置:前端传参 vs 服务端计算
- 金额/数量:负数、0、小数精度、类型替换(字符串/数组)
- 支付回调:验签缺失、金额未二次校验、notify_url 可控
- 并发结果必须有证据:多次成功响应/数据库记录差异
六、修复建议
- 金额/价格以服务端为准,禁止信任前端传参
- 状态转换服务端校验合法性(状态机表驱动)
- 幂等、唯一约束、分布式锁
- 回调验签 + 金额二次校验 + 回调防重放
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.
- 13d ago First seen · 102 lines · 94 tokens per session scan A 81c6781d64c7
business-logic-race is a skill published in the GitHub repository zhaji2333/CkSKILLS (81 stars, last pushed 12d ago), licensed MIT. It adds 94 tokens to every session and 1,331 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
officecli-word-form
Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…
officecli-data-dashboard
Use this skill to build a multi-element Excel dashboard — Dashboard sheet on open, multiple formula-driven KPI cards, multiple charts, sparklines, and conditional formatting — from CSV or tabular input. Trigger on: 'dashboard', 'KPI dashboard', 'analytics dashboard', 'executive dashboard', 'metrics dashboard', 'CSV to…
A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.
make_plan
For external plan request scenarios, guides the Agent to request a clear, actionable, step-by-step plan from a stronger Agent via listagents and chatwithagent, emphasizing that the plan is executed by the requester, not by the consulted Agent.
gpt-image-2
A skill for generating or editing images with GPT Image 2 across local, host-provided, or advisory setups.
new
Create a new project to start development quickly.