# Security Audit: Cloudflare's agent-run code security review (cloudflare/security-audit-skill) — skill card for AI agents

> AgentGid skill card. Checked on 2026-10-30 against commit c1c8a8c.
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/cloudflare/security-audit-skill/

## Explain it to a non-programmer
Your AI coding assistant becomes a careful security reviewer for your code. Ask a security question and it answers with the relevant checks. Ask for a full audit and it runs a team of helper agents in six steps. A fresh agent tries to disprove each finding, and the report gives proof and the smallest fix.

## Who it is for
- You want your own code checked for real security holes before you launch or share it
- You have a security question or a suspected problem and want a focused, source-based answer
- You use a coding assistant that can run several helper agents at once
- Not for: You want it to fix the code: the audit describes fixes and does not change your code
- Not for: You want your live site or servers tested: it reads source and runs only small local checks
- Not for: You want a quick, cheap check: a full audit launches many helper agents and costs accordingly

## What it is
- Kind: knowledge, scripts
- License: MIT
- Repository: https://github.com/cloudflare/security-audit-skill

## What it does
- Two modes: guidance (answers, focused reviews, no files) and full audit (all six phases, report files)
- 1 Reconnaissance: maps the architecture, trust boundaries and inputs, and builds a coverage ledger of what to check
- 2 Hunting: separate helper agents each take ledger units; coverage critics look for gaps
- 3 Validation: every candidate goes to a fresh agent that tries to disprove it
- 4 Structured output: confirmed, needs_validation and rejected records in findings.json, checked by a bundled script
- 5 Record verification: fresh agents re-check the final source claims
- 6 Reports written from the verified records only
- Run profiles: quick, standard (default) or deep; an optional budget caps the number of agent calls
- Domain guides for native code, AI and LLM apps, web and auth, browser code, supply chain, cloud, messaging, data isolation, desktop and mobile
- Never cuts: a concrete boundary and result for every finding, independent verification of confirmed records, no live or shared-environment testing, no severity for unproven leads
- Level quick: One hunter wave, one final critic pass, one verifier per candidate
- Level standard: The workflow as written (default)
- Level deep: Finer units, critic waves until a clean pass, separate fresh agents for each verification

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| security-audit | plain language ("security audit this codebase"); switches on by itself for security requests | no | Reviews your code for security holes and reports them with proof and the smallest fix |

### security-audit
- Asks for: The code to check (start the assistant in that folder or point it there)
- Asks for: Optional: a folder for the results, a profile (quick, standard, deep), the paths in scope, a budget of agent calls
- Gives: architecture.md and coverage-ledger.json: the map and what was checked
- Gives: findings.json: confirmed, needs_validation and rejected records
- Gives: REPORT.md: scope, posture summary, table of confirmed findings by severity, needs-validation table, hardening notes, coverage summary
- Gives: FINDINGS-DETAIL.md: full trace and local reproduction for medium, high and critical findings
- Gives: NEEDS-VALIDATION.md: unresolved leads with the exact missing fact and a safe plan
- Say: "security audit this codebase"

## Know before installing
- It switches on by itself for security requests (security audit, find vulnerabilities, pen-test the code), but only answers until you clearly ask for a full audit or a report.
- A full audit writes outside your project by default, to ~/security-audit-skill/<repo-name>/run-<N>. It writes inside the project only to a folder you pick that version control ignores.
- Running your code needs a locked-down sandbox (no network, limited writes and resources). Without one the assistant does not run your code and marks the lead as needs validation.
- It never installs packages or tests live systems: no deployed endpoints, no shared services, no paid API quota.
- A full audit launches many helper agents; set a budget (maximum agent calls) to cap cost. The skill says when a budget cannot cover the plan.
- Runs add up: a new run reads earlier ledgers and findings to target gaps and re-check changed code.

## Install (official commands)
- Any agent (Skills CLI): `npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit` — Add --global for a user-level install. Run npx skills --help for agent selection. Needs Node.js.

## What runs on the user's machine
- Code on the machine: yes (full audits (the assistant runs the two bundled checker scripts with Node))
- Network: none
- Install: Markdown guides, a JSON schema and two Node.js checker scripts. No hooks, no install scripts.
- Full audit, after the coverage ledger is created or updated: The assistant runs validate-coverage-ledger.cjs on coverage-ledger.json. It only reads the file and the schema and prints PASS or errors; no network, no writes.
- Full audit, Phase 4 and after every Phase 5 replacement: The assistant runs validate-findings.cjs on findings.json against report-schema.json. Read-only, no network.
- Full audit: The assistant writes run files (run-metadata.json, architecture.md, coverage-ledger.json, findings.json, the three reports) and per-agent scratch folders to the output folder, by default ~/security-audit-skill/<repo-name>/run-<N>.
- Checks that run your code: Only inside an OS-enforced sandbox with no external network; otherwise not run.

## Examples (from the pack's own files)
- The REPORT.md layout: output format defined in skills/security-audit/VALIDATION-AND-REPORTING.md

## Author's numbers (as reported, not run by AgentGid)
- In the author's test runs, a single run found roughly half of the vulnerabilities that repeated runs found in total. Source: cloudflare/security-audit-skill/README.md

## Steps only the person can do
- Set up an OS-enforced sandbox with no external network, an allowlisted environment, resource limits and writes only to scratch folders (only if the assistant should run your code during checks) (README.md (Requirements)) Then: The assistant runs minimal local checks inside it to confirm or reject leads

## Mistakes to avoid
- Not: Ask a security question and expect report files. Instead: Ask explicitly for a full audit, a pen-test of the codebase or a report. Why: The skill answers in guidance mode by default and writes no files until a full audit is requested
- Not: Point the output folder inside the project that git tracks. Instead: Keep the default folder in your home directory, or pick a project folder that version control ignores. Why: The run stops and asks for an outside path otherwise
- Not: Expect it to build and run your tests on a normal machine to prove a finding. Instead: Provide an OS-enforced sandbox (no external network, allowlisted environment, resource limits, scratch-only writes). Why: Without one it does not execute your code and leaves the lead as needs validation
- Not: Set a very small agent budget for a full audit. Instead: Give a budget that covers reconnaissance, critics and verifiers, or narrow the scope or choose the quick profile. Why: If the budget cannot fund the minimum, no agent is launched
- Not: Treat one run as complete coverage. Instead: Run it again on the same repo; later runs target gaps and re-check changed code. Why: Runs are additive and reuse earlier ledgers and findings

## May I use it like this?
- commercial-app: yes (MIT, Cloudflare, Inc.)
- client-work: yes (MIT)
- redistribute-files: conditions (MIT: keep the copyright and permission notice in copies)

## Which one to pick
- If You want a full multi-agent audit with independently verified, machine-readable findings and a report: skill:cloudflare/security-audit-skill
- If You want a broad set of security research, vulnerability detection and audit skills: skill:trailofbits/skills
- If Your app was built with an AI coding assistant and you want a check for the common holes such code has: skill:raroque/vibe-security-skill
- If You want separate skills that look for vulnerabilities in web or mobile apps: skill:utkusen/sast-skills

## Works well with
- tool:semgrep: A rule-based static scanner for a fast first pass; this skill does the deeper, agent-run review

## Works in and needs
- Works in Any coding agent with tool use and parallel sub-agents: skills CLI
- Needs A coding agent with parallel sub-agents: The full audit delegates work to many helper agents
- Needs Node.js: Runs the two findings and coverage-ledger checker scripts
- Needs OS-enforced sandbox: Needed only to run your code during checks

## How to tell it works
Start your coding assistant in a project and say "find security vulnerabilities in ./src". A full audit writes its files under ~/security-audit-skill/; REPORT.md opens with the run profile and scope and lists confirmed findings with a severity, and unproven leads separately without one.

## Safety
The skill reads your source and, in full audits, has the assistant run two read-only Node checker scripts. It forbids running your code without an OS-enforced sandbox, installing packages, and probing live systems. Its domain guides name attack classes such as prompt injection as things to look for; they are reference text, not instructions to your assistant. Install only from github.com/cloudflare/security-audit-skill.
