AGENT SKILL

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

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

  1. Read references/upstream/UPSTREAM-SKILL.md in full, then follow it.
  2. Load the other files in references/upstream/ only when UPSTREAM-SKILL.md or 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 of references/upstream/ in this skill, not the folder that contains this file.
  • A bare SKILL.md in the upstream docs means references/upstream/UPSTREAM-SKILL.md.
  • The validators run as node <skill-dir>/validate-findings.cjs <output-dir>/findings.json and node <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-review for a fast checklist review of one diff (staged changes, a PR, or a path). pre-pr runs 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_status is not complete, and a findings.json that validate-findings.cjs rejects (exit 2).
  • It emits only confirmed records. critical and high map to security-severity 9.5 and 8.0, so dotbabel quality reports them as security.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

kaiohenricunha
kaiohenricunha/dotbabel

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.

开发工程师
★ 0
kaiohenricunha
kaiohenricunha/dotbabel

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?".

律师与法务Skill与智能体开发
★ 0
kaiohenricunha
kaiohenricunha/dotbabel

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.

★ 0
kaiohenricunha
kaiohenricunha/dotbabel

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".

运维与部署
★ 0
kaiohenricunha
kaiohenricunha/dotbabel

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".

测试与质量运维与部署
★ 0
kaiohenricunha
kaiohenricunha/dotbabel

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/.

设计师视觉设计
★ 0