跳到正文
Skillpedia
安全41k · #6552

security-review

它能做什么

这个技能引导智能体对代码、模块或功能进行安全检查。它查找攻击者真正可能利用的弱点,并说明如何修复每一处。

适用场景

  • ✓当你在新代码上线前要求进行安全审查的时候。
  • ✓当你怀疑某项功能可能让用户看到或修改他们不该访问的数据的时候。
  • ✓当你想检查项目中是否泄露了密码、密钥或不安全命令的时候。

技能链接

https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/security-review/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/security-review/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查我的登录功能是否有安全漏洞,并告诉我如何修复任何有风险的地方?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会梳理外部输入进入代码的位置以及它可能造成危害的地方,然后逐步追踪这些数据,并只报告它能够指出的问题,附上文件和修复方法。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Security Review

Produce findings a reviewer can verify, not a vibes pass. Every finding names the file, the reachable path that makes it real, and the fix.

Scope the review first

  • What is under review: a diff, a module, a plugin bundle, a network surface. Say the boundary out loud before reading.
  • Trust boundaries: where untrusted input enters (HTTP handlers, MCP tool args, file parsers, CLI flags, env vars, rendered content) and where authority is exercised (fs writes, network egress, process spawn, credential reads, signing).
  • Prerequisites: a checked-out tree and the project's own test runner. Ask for credentials only if a live path genuinely needs them; never read secrets from the environment or keychain yourself.

Procedure

  1. Map entry points and sinks. rg for the handlers, deserializers, and exec/fs/net calls in scope. Follow data from entry to sink before judging it.
  2. Authn/authz. Every mutating or sensitive handler checks identity and object-level authorization. Look for checks that exist on one path but not its sibling, and for checks done on the client only.
  3. Injection. Command lines, SQL, template eval, shell expansion, path joins under user influence, and markup that will render later — including generated HTML/markdown that carries repo content into a browser surface.
  4. Secrets. rg for token/key/secret patterns and git log -p the diff for credentials. Also check what gets logged or embedded in receipts, exports, or error messages.
  5. Dependencies. Run the project's audit gate if it exists (cargo audit, npm audit, osv-scanner) — report versions and CVEs, not "deps look old".
  6. Denial and abuse paths. Unbounded reads/allocations, missing timeouts on network calls, resource leaks in error paths, retry storms.
  7. Verify a finding before reporting it. Trace the real call path or write a minimal proof. A finding that "looks suspicious" but has no reachable path is a note, not a finding.

Findings format

For each: severity (exploitability × impact), file:line, the reachable path, a one-paragraph explanation, and the fix. Order by severity. Then a short "checked and clean" list naming what was audited and cleared — the scope statement means something only if the clear list is honest.

Recovery and limits

  • If you cannot prove reachability, downgrade the claim and say what evidence is missing.
  • Do not claim a formal audit, certification, or absence of vulnerabilities. This review finds defects; it does not prove none exist.
  • Never fix-and-stay-quiet on a security finding in someone else's in-flight code — report it first.

Completion criteria

  • Every entry point in scope was traced to its sinks.
  • Findings carry file:line + reachability + fix; the clear list names what was actually checked.
  • Severity ordering is defensible by exploitability, not by how loudly the code smells.
常见问题

这和普通代码审查一样吗?

不一样。它关注可被利用的弱点,而不是一般的质量、风格或代码整洁度。

智能体会读取我的密码或密钥吗?

技能说明,智能体不应自行从环境变量或钥匙串中读取机密信息,只有在实时测试确实需要时才请求凭证。

每项发现都附带修复方法吗?

是的。每项发现都会指明文件、使其成为真实风险的路径以及建议的修复方法。

详情

作者的原始描述

Review a change, module, or surface for exploitable defects — trust boundaries, authn/authz, injection, secret exposure, filesystem and network reach, dependency risk. Use when the user asks for a security review, audit, or vulnerability check of concrete code. Not for general code review, lint, or compliance paperwork.

repo: codewhale-hq/Codewhale

热度

GitHub 星标
41k
排名
#6552
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能