security-audit
Whole-repository security audit with independent verification of every finding, vendored from cloudflare/security-audit-skill. Guidance by default; runs the full six-phase audit (parallel hunters, verifiers that did not hunt, coverage ledger, schema-validated findings.json) only on an explicit audit or pen-test request. Triggers on: "security audit", "audit this codebase", "pen test the code", "full security review", "end-to-end security review", "security audit report".
- License 许可
- MIT
- 最近更新
- 2026-10-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- id
- security-audit
- name
- security-audit
- task
- [ "review", "diagnostics" ]
- type
- skill
- model
- opus
- owner
- @kaiohenricunha
- domain
- [ "devex", "security" ]
- created
- 1790035200000
- updated
- 1790035200000
- version
- 1.0.0
- dotbabel
- { "compute": { "mode": "floor", "binding": "consumer", "requirement": "frontier" } }
- maturity
- draft
- platform
- [ "none" ]
- description
- Whole-repository security audit with independent verification of every finding, vendored from cloudflare/security-audit-skill. Guidance by default; runs the full six-phase audit (parallel hunters, verifiers that did not hunt, coverage ledger, schema-validated findings.json) only on an explicit audit or pen-test request. Triggers on: "security audit", "audit this codebase", "pen test the code", "full security review", "end-to-end security review", "security audit report".
- argument-hint
- [scope path | subsystem | <base>..<head>] [--profile quick|standard|deep]
02 资源文件 25
- 参考文档references/UPSTREAM.json4.2 KB
- 参考文档references/upstream/AI-AND-LLM.md10.4 KB
- 参考文档references/upstream/ATTACK-CLASSES.md15.3 KB
- 参考文档references/upstream/CLIENT-SIDE.md8.4 KB
- 参考文档references/upstream/CLOUD-AND-DEPLOYMENT.md8.1 KB
- 参考文档references/upstream/DATA-ISOLATION-AND-LIFECYCLE.md7.6 KB
- 参考文档references/upstream/DESKTOP-MOBILE-AND-LOCAL-IPC.md8.5 KB
- 参考文档references/upstream/HUNTING.md21.9 KB
- 许可证references/upstream/LICENSE1.1 KB
- 参考文档references/upstream/MEMORY-SAFETY-AND-BINARY.md10.3 KB
- 参考文档references/upstream/PROTOCOLS-RPC-AND-MESSAGING.md7.3 KB
- 参考文档references/upstream/RECONNAISSANCE.md15.5 KB
- 参考文档references/upstream/report-schema.json14.2 KB
- 参考文档references/upstream/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md7.3 KB
- 参考文档references/upstream/SUPPLY-CHAIN-AND-RELEASE.md7.1 KB
- 参考文档references/upstream/UPSTREAM-SKILL.md21.5 KB
- 脚本references/upstream/validate-coverage-ledger.cjs32.7 KB
- 脚本references/upstream/validate-coverage-ledger.test.cjs27.8 KB
- 脚本references/upstream/validate-findings.cjs28.1 KB
- 脚本references/upstream/validate-findings.test.cjs25.8 KB
- 参考文档references/upstream/VALIDATION-AND-REPORTING.md17.4 KB
- 参考文档references/upstream/WEB-PROTOCOL-AND-AUTH.md12.0 KB
- 脚本scripts/findings-to-sarif.mjs6.6 KB
- 脚本scripts/promote-artifact/promote-artifact_test.go9.1 KB
- 脚本scripts/promote-artifact/promote-artifact.go12.7 KB
03 SKILL.md 正文
Security Audit
This skill wraps the upstream cloudflare/security-audit-skill. The upstream workflow is authoritative. This file only maps it onto dotbabel hosts.
Read the upstream skill first
- Read
references/upstream/UPSTREAM-SKILL.mdin full, then follow it. - Load the other files in
references/upstream/only whenUPSTREAM-SKILL.mdor a phase document tells you to.
The upstream copy is pinned and unchanged. references/UPSTREAM.json records the commit.
Do not edit files in references/upstream/. A maintainer updates them with scripts/sync-security-audit.mjs.
Path mapping
The upstream docs assume that the upstream SKILL.md sits at the skill root. In this layout:
- Skill directory and
<skill-dir>mean the absolute path ofreferences/upstream/in this skill, not the folder that contains this file. - A bare
SKILL.mdin the upstream docs meansreferences/upstream/UPSTREAM-SKILL.md. - The validators run as
node <skill-dir>/validate-findings.cjs <output-dir>/findings.jsonandnode <skill-dir>/validate-coverage-ledger.cjs <output-dir>/coverage-ledger.json.
Host mapping
The upstream roles are agent-neutral (UPSTREAM-SKILL.md, "Platform terminology").
| Upstream role | Claude Code |
|---|---|
| Parent | The main session. It is the only writer of shared run files. |
| Task tool | The Agent tool. |
research agent |
subagent_type: general-purpose, with a prompt that keeps it read-only. Do not use Explore: it reads file excerpts, and the upstream verifiers need whole-file reads. |
general agent |
subagent_type: general-purpose. |
On Codex, Gemini, Copilot, or another host, use the host's sub-agent mechanism only when each agent gets its own context.
- If the host has no isolated parallel sub-agents, do not run full audit mode. The upstream guarantee is that the agent that checks a finding never found it. Say that this host cannot give that guarantee, and offer guidance mode.
- If the host cannot enforce every OS sandbox control in "Universal execution safety", do not execute target code. Keep such leads as
needs_validation, as the upstream rules require.
Retaining evidence from a sandboxed check
Scratch is target-controlled after a check runs, so the upstream rules let only trusted parent-side code copy a file out of it, following the no-follow, descriptor-relative procedure in UPSTREAM-SKILL.md ("Write isolation"). Node has no openat, so the parent cannot do this itself. scripts/promote-artifact/promote-artifact.go implements that procedure.
go run scripts/promote-artifact/promote-artifact.go \
--scratch <output-dir>/agents/<agent-id>/scratch \
--artifacts <output-dir>/agents/<agent-id>/artifacts \
--manifest <manifest.json>
The manifest is the allowlist the parent recorded before the sandbox started:
{ "max_file_bytes": 1048576, "max_total_bytes": 8388608, "files": ["report.txt"] }
It prints a JSON result — promoted with the byte count and sha256 of each file, refused with the exact reason for each — and exits 0 when everything was promoted, 1 when anything was refused, 2 on an environment error, 64 on bad usage. Copy a refusal reason verbatim into the ledger; it is the promotion blocker the record needs.
It refuses a symlinked component or leaf, a non-regular file, a hard-linked file, an over-limit or budget-busting file, an existing destination, and a source whose identity changes during the copy.
When this is available: the parent may run target code inside the OS-enforced sandbox and record a method: "local" check citing agents/<agent-id>/artifacts/<file>. When it is not — no Go toolchain, or a platform without openat — nothing changes from the rules above: do not use scratch output as evidence, and keep the lead as needs_validation with the blocker "local execution evidence cannot be retained in this run: no parent-side artifact promotion available".
The agent never runs the promoter and never writes to artifacts/. Only the parent does.
When to use this skill, and when to use security-review
- Use
security-reviewfor a fast checklist review of one diff (staged changes, a PR, or a path).pre-prruns it. - Use this skill for a whole-repository or subsystem audit, a pen-test-style source review, or report artifacts. A standard run takes a long time and launches many agents. Tell the user the profile and any agent budget before you start (
UPSTREAM-SKILL.md, "Run profiles and scope" and "Cost budget").
Optional: feed confirmed findings to dotbabel quality
scripts/findings-to-sarif.mjs converts a finished run into SARIF 2.1.0:
node <this-skill>/scripts/findings-to-sarif.mjs --run-dir <output-dir> --out .dotbabel/security-audit.sarif
- It refuses a run whose
run_statusis notcomplete, and afindings.jsonthatvalidate-findings.cjsrejects (exit 2). - It emits only
confirmedrecords.criticalandhighmap tosecurity-severity9.5 and 8.0, sodotbabel qualityreports them assecurity.high_confidence.
To make the pr and deep quality profiles read the last run, write the run to an output directory that git ignores (the upstream rules allow this only when you select it and git ignores it), then declare the converter as the security tool in .dotbabel.json:
{
"quality": {
"components": [
{
"root": ".",
"languages": ["javascript"],
"tools": {
"security": {
"argv": [
"node",
".claude/skills/security-audit/scripts/findings-to-sarif.mjs",
"--run-dir",
".security-audit/run-1",
"--out",
".dotbabel/security-audit.sarif"
],
"report": { "format": "sarif", "path": ".dotbabel/security-audit.sarif" }
}
}
}
]
}
}
Change languages and the run directory to match the repository. The script path above is the dotbabel init install location. A bootstrap.sh install uses ~/.claude/skills/security-audit/ instead.
Attribution
The upstream skill is Copyright Cloudflare, Inc. and ships under the MIT License in references/upstream/LICENSE.
04 同仓库更多 Skills
yolo
Start temporary autonomy for the current task or an explicit scope with a required --for expiry. Codex permits scoped pushes, merges, deploys, and releases after strict testing and validation; Full access is a separate runtime setting. Claude Code uses a session permission hook with a protected-action denylist.
veracity-audit
Audit a data pipeline for Veracity and Value. Dispatches data-scientist, compliance-auditor, and data-engineer agents with project context injected at dispatch time. All source paths are supplied via flags — no defaults, no project assumptions. Subcommands: audit (full pipeline walk), score-check (scoring math only), gate-check (gate coverage only), source-trace <label> (single source end-to-end). Invoke when: "audit pipeline", "veracity check", "scoring math correct?", "check gates", "trace source", "verify quality gates", "formula correct?".
validate-spec
Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs/audits/. Use whenever the user asks to "validate a spec", "audit a spec", "check if spec is implemented", "verify the spec is done", "is this spec really done", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.
terragrunt-specialist
Deep-dive Terragrunt hierarchy review, DRY pattern audits, and run-all orchestration analysis. Use for structured investigations of multi-environment Terragrunt layouts, dependency graphs, remote state config, and hook correctness. Triggers on: "Terragrunt audit", "run-all review", "dependency block", "DRY pattern review", "env hierarchy audit", "mock_outputs", "terragrunt hooks".
terraform-specialist
Deep-dive Terraform architecture review, module design, state management, and migration. Use for structured investigations of Terraform workspaces, provider configuration, module coupling, import workflows, and test coverage. Triggers on: "Terraform audit", "module review", "state management", "Terraform import", "workspace design", "provider config review", "Terraform testing".
spec
Create structured engineering specs through interactive pairing. Use when the user wants to create a spec, design doc, technical specification, architecture document, RFC, or engineering plan. Triggers on "let's spec this out", "create a spec", "design doc", "write a technical plan", "plan the architecture". Works for greenfield and brownfield projects. Outputs to docs/specs/.