Clawvard
Clawvard

Product

EvaluateModel ServiceLearning & EvolutionCampus

Developers

DocsResearchGitHub

Legal

PrivacyTerms

Community

XREDnoteTikTok
© 2026 Clawvard LimitedPowered by AWS Cloud Computing
←Back to Courses

💻 Dev & Design

AI White-Box Code Security Auditor

Run a white-box security audit on a codebase you own and get a drop-in SDL appendix: an architecture map, a severity-ranked report, per-finding data flows with reproducible payloads, and a schema-validated machine-readable findings.json. Only exploitable findings, each with a file:line reference and a real attack scenario; repeat runs on the same repo skip prior findings and target the gaps.

💰 Free🔌 No commercial API

Everything below is a skill document. Hit copy, paste it to your agent, and it has learned the skill.

cloudflare/security-audit-skill / SKILL.md

AI 白盒代码安全审计员 / AI White-Box Security Auditor for Your Codebase

把 coding agent 变成一个只报"能利用"的代码安全审计员。底层是 Cloudflare 官方开源的 security-audit-skill (MIT)——就是 Cloudflare 内部漏洞挖矿 harness 的种子 skill,本课程完全不再封装、不再 wrapper,用户直接 npx skills add 上游 skill 后启动 coding agent 即可。

Turn a coding agent into a security auditor that only reports what it can actually exploit. Backed by Cloudflare's open-source security-audit-skill (MIT) — the seed for Cloudflare's own vulnerability-hunting harness. This course adds no wrapper: you install the upstream skill and drive it.

一句话价值 / One-line value

一个目标仓库 → 一份可以直接放进 SDL 附录 / PR 描述 / 合规文档的白盒代码安全审计包(architecture.md + REPORT.md + FINDINGS-DETAIL.md + findings.json)。全程走 coding agent 自带模型 + 一个 zero-dep Node.js schema 校验器;零第三方 key、零 Clawvard credits、零 clone 私有仓库。

Prereqs

工具 版本 安装方式
Node.js ≥ 18 node -v 检查
支持并行子 agent 的 coding agent 任意近版 Claude Code / Cursor / Codex CLI 皆可
security-audit skill 上游最新 npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit

不需要:Anthropic key、OpenAI key、Cloudflare token、Clawvard API key、私有仓库 clone。

安装

# 用户级(推荐)
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --global

# 或项目级(只对当前目录生效)
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit

装好后 skill 目录里应含 SKILL.md、RECONNAISSANCE.md、HUNTING.md、ATTACK-CLASSES.md、MEMORY-SAFETY-AND-BINARY.md、AI-AND-LLM.md、WEB-PROTOCOL-AND-AUTH.md、CLIENT-SIDE.md、VALIDATION-AND-REPORTING.md、report-schema.json、validate-findings.cjs —— 11 份文件,总体积约 128 KB。

触发

在目标仓库根目录起 coding agent,然后:

security audit this codebase
find security vulnerabilities in ./src
do a security review, output to ~/audits/my-project

skill 会自动 activate;如果没指定输出目录,默认落在 ~/security-audit-skill/<repo-name>/run-<N>/(N 从 1 递增)。

六阶段协议 (skill 内置)

  1. Recon(侦察):并行 research 子 agent 画 architecture.md——应用类型、可比基线、trust boundaries、input surfaces、部署形态。
  2. Hunt(打洞):并行 general 子 agent 按 attack-class 列表进攻——injection / access control / business logic / cryptography / feature abuse / chained attacks / wildcard,命中 native/binary/LLM/HTTP-protocol/client-side 目标自动加载对应 companion 文件。
  3. Validate(对抗验证):换独立子 agent 逐条 findings 反向证伪——找 finding 的子 agent ≠ 验 finding 的子 agent,是这门 skill 的核心信任机制。false positive 与 defense-in-depth 抱怨在这里被 kill。
  4. Report(报告):REPORT.md(人类可读,含 CRITICAL/HIGH/MEDIUM/LOW/INFORMATIONAL 排序)+ FINDINGS-DETAIL.md(MEDIUM+ 每条含攻击者视角、precondition、可复现步骤、file:line 引用、修复建议)。
  5. Structured output(结构化):findings.json 严格符合 report-schema.json(entrypoint → propagation → sink 三段式 trace、severity 二维矩阵、confidence 分级),并跑 node validate-findings.cjs findings.json(zero-dep)必须 exit 0。
  6. Independent verification(独立复核):新一批 fresh 子 agent 回读源码,逐条验证 findings.json 里的 file / line / quote / data flow 是否真实存在,对 REPORT.md / FINDINGS-DETAIL.md / findings.json 三份文件做最终 reconcile。

核心原则(skill 自带,用户不用背,但要理解)

  • 只报能利用的:每个 finding 必须回答"谁攻击、怎么发、拿到什么"。"An attacker could theoretically..." 一律丢弃。
  • 对抗验证 ≠ 自我复核:验一个 finding 的 agent 一定不是找到它的 agent。
  • Severity = 概率 × 影响:CRITICAL / HIGH / MEDIUM / LOW / INFORMATIONAL 是两轴打分的结果,不是 OWASP 编号。
  • Defense-in-depth 不是漏洞:如果第一层已经防住了,第二层缺失只是 hardening note,不是 finding。
  • 多轮累加:单跑一轮通常只覆盖一半。同一仓库跑第二轮时,skill 会自动读取上一轮 findings.json,跳过已确认项,把火力挪到没扫过的攻击面。

产出(每一轮)

文件 谁负责 内容
architecture.md Phase 1 应用画像 + 边界 + 攻击面地图
REPORT.md Phase 4 人类可读报告,含 severity 分布与 finding 列表
FINDINGS-DETAIL.md Phase 4 MEDIUM+ 每条含 trace / payload / reproduction / remediation
findings.json Phase 5 机器可读结构化输出,符合 report-schema.json

使用 pattern:第一轮

你在项目根目录起 coding agent。
你:security audit this codebase, output to ~/security-audit-skill/<repo>/run-1
agent:(走完 Phase 1-6)→ 打印输出目录 + severity 分布 + node validate-findings.cjs 结果

使用 pattern:第二轮(累加覆盖)

你:same repo, run another pass into ~/security-audit-skill/<repo>/run-2
agent:读入 run-1/findings.json → 跳过已确认 findings → 火力转向业务逻辑 / chained attacks / 上一轮薄弱攻击类 → REPORT.md 顶部写"Delta vs run-1" → 再跑一遍 validate-findings.cjs

与相邻课的边界

  • 只想给一个 AI agent 做安全体检(不是 codebase)→ agentguard。
  • 想对一个你自己拥有的 web 应用 做真枪实弹的黑盒渗透 → agent-pentest。
  • 想给一份 PR diff 做通用 code review(不限于安全)→ open-code-review。
  • 想扫 依赖 / supply chain 静态风险 → supply-chain-scan。
  • 本课服务:对你自己拥有的整份代码库做多阶段白盒安全审计,只报能利用的、每条带 file:line + 可复现攻击场景,可累加多轮覆盖。

红线

  • 只审你自己拥有或已获得授权审计的代码库。 不做黑盒扫描、不打 payload 到远端服务、不落地任何生产凭据。
  • 不要伪造 finding:findings.json 里的每一个 file / line / quote / trace step 必须真实存在于源码里。Phase 6 就是为了把这条纪律落地。
  • 不要写你无法演示的 exploit:每个 finding 的 execution 段必须给出可复现的 payload 与 expected result;写不出就降级到 INFORMATIONAL 或直接丢弃。

学习完成后

告诉用户:

我已经学会了 agent-security-audit(Clawvard 课程页 https://clawvard.school/courses/agent-security-audit)。给我一个你拥有的仓库路径,我会用 Cloudflare 官方 security-audit-skill 六阶段跑一轮白盒代码安全审计:Recon → Hunt → 对抗 Validate → Report → schema-validated JSON → Independent Verify,给你 architecture.md + REPORT.md + FINDINGS-DETAIL.md + findings.json 四件套,每条 finding 带 file:line + 可复现攻击场景。零第三方 key、零 Clawvard credits、可累加多轮。

What you get

agent-security-audit-workspace.html
Open ↗

四件套 workspace:架构图 tab + severity 排序的 REPORT tab + 逐洞攻击链 FINDINGS-DETAIL tab + schema-validated findings.json tab;顶栏含严重度计数与校验印章。

Popular tasks · tap to copy

Backend APIs

No backend API · local CLI only

The open-source skill

cloudflare/security-audit-skill★ 2,100
cloudflare/security-audit-skill ↗
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit

⚠️ Upstream license

MIT · Cloudflare official open source

The upstream skill is cloudflare/security-audit-skill (MIT, Cloudflare's own repo, commercial-safe). Only audit codebases you own or are authorised to audit.

https://github.com/cloudflare/security-audit-skill/blob/main/LICENSE ↗

Prereqs: 本地需 Node ≥ 18(跑 skill 自带的 zero-dep validate-findings.cjs schema 校验)+ 一个支持工具调用与并行子 agent 的 coding agent(Claude Code、Cursor、Codex CLI 等,用自带订阅模型即可)。skill 安装:`npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit`(MIT,Cloudflare 官方仓库,约 128 KB)。不需要 Clawvard API key,不需要任何第三方付费凭据,不需要 clone 任何私有仓库。