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.
npx skills add Wade-DevCode/awesome-coding-skills-cn --skill security-reviewgit clone --depth 1 https://github.com/Wade-DevCode/awesome-coding-skills-cnWrote 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/wade-devcode/awesome-coding-skills-cn/security-review)<a href="https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/security-review"><img src="https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/security-review/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/wade-devcode/awesome-coding-skills-cn/security-review"><img src="https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/security-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00028 | $0.02430 |
| Opus 5.5 | $0.00011 | $0.00972 |
| Sonnet 5.5 | $0.00006 | $0.00486 |
| Haiku 4.5 | $0.00003 | $0.00243 |
Grade A, and why
security-review 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 1mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
# 反例:os.system 拼接 How it starts
The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.
安全审查
何时用
- 新功能上线前做安全审查。
- 代码涉及用户输入处理、认证鉴权、数据库查询、文件操作时。
- 接到安全漏洞报告,需要定位和评估影响范围时。
- 引入第三方依赖或集成外部 API 前。
核心规则
1. 输入即不可信:防注入(SQL / 命令 / XSS)
规则: 所有来自外部的数据(HTTP 参数、请求体、文件内容、消息队列、环境变量)默认不可信;SQL 查询用参数化语句,系统命令用参数列表而非字符串拼接,HTML 输出做转义。
为什么: AI 生成数据库查询时极容易回退到字符串拼接:"SELECT * FROM users WHERE id=" + userId。在 userId 为 "1 OR 1=1" 时整张表被泄露,为 "1; DROP TABLE users--" 时数据被删除。2023 年 OWASP Top 10 注入漏洞仍居首位,AI 代码贡献了相当比例的新增漏洞。
怎么做:
# 反例:字符串拼接
query = f"SELECT * FROM users WHERE name='{name}'"
cursor.execute(query)
# 正例:参数化查询
cursor.execute("SELECT * FROM users WHERE name = %s", (name,))
# 反例:os.system 拼接
os.system(f"ffmpeg -i {filename} output.mp4")
# 正例:参数列表,不经 shell 解释
subprocess.run(["ffmpeg", "-i", filename, "output.mp4"], check=True)
- 前端输出用模板引擎的自动转义(如 Jinja2 的
{{ var }}),禁止用innerHTML = userInput。
2. 认证与会话:加盐哈希、有效期、防爆破
规则: 密码存储用 bcrypt/Argon2(禁用 MD5/SHA1/SHA256 直接哈希);session token 和 JWT 设置合理有效期并支持服务端撤销;登录接口做频率限制防爆破。
为什么: AI 实现用户注册时,最常见的错误是 hashlib.sha256(password.encode()).hexdigest() 存库。SHA256 无盐、速度极快,彩虹表或 GPU 暴力破解成本极低;一旦数据库泄露,大量账号密码几分钟内被还原。另一个常见问题:AI 生成的 JWT 不设 exp 字段,token 一旦泄露永久有效,撤销无从实现。
怎么做:
import bcrypt
# 存储:自动加盐
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
# 验证
bcrypt.checkpw(password.encode(), hashed)
import jwt
from datetime import datetime, timedelta, timezone
token = jwt.encode({
"sub": user_id,
"exp": datetime.now(timezone.utc) + timedelta(hours=1), # ✅ 设有效期
"jti": str(uuid4()), # ✅ 支持黑名单撤销
}, SECRET_KEY, algorithm="HS256")
- 登录接口接入 rate limiter(如
flask-limiter),同 IP 5 次失败后锁定 15 分钟。
3. 越权检查:服务端逐操作校验,不只前端隐藏
规则: 每个修改/查询敏感数据的 API,都在服务端校验"当前登录用户是否有权访问这条数据"(对象级权限,OWASP BOLA/IDOR);前端隐藏按钮或菜单不构成权限控制。
为什么: AI 生成 CRUD API 时极少主动加资源所有权校验,只校验"用户是否已登录",不校验"用户是否拥有这条记录"。攻击者只需将 URL 中的 id=123 改为 id=124 就能访问或修改其他人的数据(IDOR 漏洞)。这类漏洞在 AI 生成的代码中出现频率极高,因为 AI 习惯生成通用模板而非针对业务的细粒度鉴权。
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.
- 1mo ago First seen · 210 lines · 28 tokens per session scan A 5b8ea0e94cae
security-review is a skill published in the GitHub repository Wade-DevCode/awesome-coding-skills-cn (7 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 2,430 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
chinese-code-review
A Chinese-language code-review communication guide with templates and severity levels for review comments.
receiving-code-review
A guide for handling code-review feedback carefully. Code review is the process of checking proposed changes before they are accepted into a project.
requesting-code-review
A code-review procedure for checking completed work against its requirements before it spreads or is merged. A code reviewer is a person or agent who looks for defects and missing parts.
007
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
executing-plans
A procedure for carrying out a written software implementation plan in a separate session, including reviewing the plan, completing its tasks, and checking the results at defined review points.
chinese-git-workflow
A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.