security-audit
它能做什么
这个技能引导 AI 智能体完成软件的安全审查,从快速提问到完整审计。适合需要清晰、有证据支持的发现结果的开发者和安全人员。
适用场景
- ✓当你就某段代码或某个 API 提出一个具体的安全问题的时候。
- ✓当你想对代码库进行安全审计或渗透测试的时候。
- ✓当你需要一份按优先级排列的漏洞清单,并附有最小有效修复方案的时候。
技能链接
https://github.com/cloudflare/security-audit-skill/blob/main/skills/security-audit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我对登录 API 进行安全审查,对任何问题都要给出清晰的证据和修复建议。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体首先阅读源代码,寻找跨越真正信任边界的弱点。对于完整审计,它会分几个阶段进行,并可以撰写报告。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Security Audit
Find vulnerabilities that violate a real trust boundary, then give owners the source evidence, safe reproduction, priority, and smallest effective fix. This is a defensive, source-first workflow. A candidate without a concrete affected principal, resource, or security outcome is not a confirmed finding.
Operating modes
This skill is guidance by default. Loading it does not authorize the complete audit workflow or file creation.
- Guidance mode: For security questions, focused reviews, methodology, triage, or investigation of specific findings, use only the relevant parts of this skill. Do not automatically run all six phases, create an output directory, or write audit artifacts. You may launch focused agents when useful; they return results to the current task.
- Full audit mode: Use the complete workflow when the user explicitly asks to audit or pen-test a codebase, asks for a full, comprehensive, or end-to-end security review, or requests report artifacts. Run all six phases and write the files defined below.
If the request could mean either mode, ask one focused question before creating files or starting the complete workflow.
Platform terminology
This skill is agent-neutral:
- Parent is the agent that coordinates the run and owns shared state.
- Task tool is the platform's delegation or sub-agent mechanism.
researchagent is a delegated agent for focused source exploration and factual verification.generalagent is a delegated agent for broad investigation and bounded local execution.subagent_type:in a heading names which of these two delegated agent roles runs that work.
Use equivalent platform capabilities while preserving role, write-isolation, prompt, and independence boundaries.
Universal execution safety
These rules apply in both operating modes. Source inspection is read-only. Run target-controlled builds, tests, processes, browsers, emulators, fuzzers, and fixture processing only inside an OS-enforced sandbox that provides all of these controls:
- no external network; use only an isolated loopback namespace when the check needs local client/server traffic;
- an empty environment populated from an explicit allowlist with safe values, with scratch-local
HOME, temporary directories, and caches; - a read-only target and toolchain, with the target-controlled process able to write only inside its assigned
scratch/directory; and - explicit low CPU, memory, process, file-size, disk, and wall-clock limits.
The agent, outside the target-controlled process, may make a disposable source copy in an assigned scratch/ directory when a build must write beside source. In guidance mode, do not retain target-controlled files. In full audit mode, only trusted parent-side code may promote the minimum non-secret result to retained artifacts/ using the procedure under Write isolation. Never expose a retained output directory (other than the agent's own assigned scratch/), another agent's directory, the host home directory, credentials, sockets, or shared services to target code. Do not install dependencies or let builds fetch them. Use only tools and dependencies already available locally. If every control cannot be enforced, do not execute target code: report the missing sandbox capability as a needs-validation blocker and give a safe validation plan.
Use dummy principals, fixtures, and secrets. Do not probe deployed endpoints, external services, shared infrastructure, production identities, other users' data, or live control planes. Do not test availability against a live or shared process, publish artifacts, alter releases, spend paid API quota, or continue beyond the minimum local effect needed to establish a defect. If the decisive fact is outside source or the sandboxed fixture, report it as needing validation.
Full audit setup
In full audit mode, resolve these values before reconnaissance:
- Skill directory: the absolute directory containing this
SKILL.md. - Target: the absolute repository root under review.
- Repo name: a stable repository identifier from the directory or local Git remote.
- Output directory: a new writable directory outside the target, defaulting to
~/security-audit-skill/<repo-name>/run-<N>, where<N>is the next unused integer. Use a directory inside the target only when the user explicitly selects it and the parent verifies that version control ignores the whole directory. Otherwi
常见问题
每个安全问题都会启动完整审计吗?
不会。该技能说明,具体的问题只使用相关部分,只有在你要求时才会进行完整审计或生成报告。
它会在我的电脑上创建文件吗?
只有在完整审计模式下,它才会写入报告文件。指导模式不会创建审计文件。
什么才算已确认的发现?
该技能说明,候选问题需要有明确受影响的用户、资源或安全后果,才算已确认。
详情
作者的原始描述
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
热度
- GitHub 星标
- 57k
- 排名
- #3276
- 许可证
- MIT
- 更新时间
- 2026/9/14
评论
- …