OpenClaw 技能:为Node.js网络项目(游戏、数据工具、微信、API、机器人)动态错误审计。200+ 现实世界的陷阱。
概览
不要运行清单。先拆解项目,然后彻底核实每个实体。 基于一个艰难的经验教训:一个项目使用通用检查表寻找172个漏洞。事后分析显示,先构建项目特定的校验矩阵会发现大多数漏洞。 通用检查列表能发现“已知模式”的漏洞(如CORS、XSS、时区)。但最关键的bug包括:- 购买API接受成本=0→免费购买(不在任何检查列表中)- raid结果可调用而无需先购买→无限金钱漏洞 - 搜索完成无法验证远程掠夺→ 这些漏洞存在于 ,而不是单个代码模式中。 最大的bug(购买绕过、缺少突袭令牌)隐藏在API之间的链接中。 然后说:“对这个项目执行bug排查”或“auditing this project有bug”。 维基上有完整文档:- 解剖流程详解 — 如何构建每个表格,需要问什么 - 排查模块一览 — 9个通用模块用于补充检查 - 实战踩坑速查 — 高频陷阱 + 远程调试
概述(AI 翻译)
不要运行清单。先拆解项目,然后彻底核实每个实体。
基于一个艰难的教训:一个项目用了21轮,用通用检查表找到172个漏洞。事后分析显示,先构建项目特定的检查矩阵,大多数漏洞在3-4轮内就能抓到。
清单的问题
通用检查表可以捕捉“已知模式”的漏洞(如CORS、XSS、时区)。但大多数关键漏洞是项目特定的逻辑漏洞:
buyAPI 接受cost=0→ 免费购买(不在任何清单中)raid-result可调用而无需调用buy→无限资金漏洞- 搜索完成无法验证远程→掠夺的距离
这些漏洞存在于API之间的关系中,而非单个代码模式。
解决方案:解剖→验证→补充剂
六桌
| 表格 | 摘录 | 关键问题 |
|---|---|---|
| API 端点 | 每条路由:方法、路径、认证、参数 | 我能绕过吗?如果我发送垃圾怎么办? |
| 状态机 | 每个状态变量:设置器、读取器、生命周期 | 它会在多个生命周期间泄漏吗? |
| 计时器 | 每个setTimeout/setInterval | 清理后会触发吗? |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
🔍 Bug Audit Skill
Don’t run a checklist. Dissect the project, then exhaustively verify every entity.
Built from a hard lesson: a project took 21 rounds to find 172 bugs using generic checklists. Post-mortem revealed that building project-specific check matrices first would have caught most bugs in 3-4 rounds.
The Problem with Checklists
Generic checklists catch “known pattern” bugs (CORS, XSS, timezone). But most critical bugs are project-specific logic vulnerabilities:
buyAPI acceptscost=0→ free purchases (not in any checklist)raid-resultcallable without callingbuyfirst → infinite money exploit- Search completion doesn’t verify distance → remote looting
These bugs live in the relationships between APIs, not in individual code patterns.
The Solution: Dissect → Verify → Supplement
Phase 1: Dissect — Read code, build 6 project-specific tables (10-15 min)
Phase 2: Verify — Exhaustively check every row in every table
Phase 3: Supplement — Run generic modules as safety net
Phase 4: Regress — Check fixes didn't introduce new bugs
Phase 5: Archive — Record pitfalls for next audit
The 6 Tables
| Table | Extracts | Key Question |
|---|---|---|
| API Endpoints | Every route: method, path, auth, params | Can I bypass? What if I send garbage? |
| State Machines | Every state variable: setter, reader, lifecycle | Does it leak across lifecycles? |
| Timers | Every setTimeout/setInterval | Does it fire after cleanup? |
| Numeric Values | Every user-influenceable number | What if 0? Negative? Huge? |
| Data Flows | Every related API pair (buy→use) | Can I skip Step 1 and call Step 2 directly? |
| Resource Ledger | Every resource: all inflows, all outflows | Is there an infinite loop? |
Data Flows table is the most critical. The biggest bugs (buy bypass, missing raid tokens) hide in the links between APIs.
Install
clawhub install bug-audit
Or manually:
git clone https://github.com/abczsl520/bug-audit-skill.git ~/.openclaw/skills/bug-audit
Then say: “对这个项目执行bug排查” or “audit this project for bugs”
What’s Inside
| File | Content |
|---|---|
SKILL.md |
Core methodology: 6 tables + 5 phases |
references/modules.md |
9 generic audit modules for Phase 3 |
references/pitfalls.md |
200+ real-world pitfalls + debugging techniques |
Documentation
Full docs on the Wiki:
- 解剖流程详解 — How to build each table, what to ask
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add abczsl520/bug-audit-skill