agentleFS
kaiohenricunhakaiohenricunha/dotbabel/skills/security-audit/SKILL.md

security-audit

Skill0 starsChanged 2 months agoMITView on GitHub

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

140 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use asset-spec, create-control-manifest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +10 more from cenconq25

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 118 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read references/upstream/UPSTREAM-SKILL.md in full, then follow it.

    line 31
  2. Very specific:

    Do not edit files in references/upstream/.

    line 35
  3. Distinctive:

    If the host has no isolated parallel sub-agents, do not run full audit mode.

    line 58
  4. Very specific:

    If the host cannot enforce every OS sandbox control in "Universal execution safety", do not execute target code.

    line 59
  5. Very specific:

    Use security-review for a fast checklist review of one diff (staged changes, a PR, or a path).

    line 88

“Common” is measured: kept by at least 6 in 10 of the 118 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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 roleClaude Code
ParentThe main session. It is the only writer of shared run files.
Task toolThe Agent tool.
research agentsubagent_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 agentsubagent_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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.