Skip to content

Guide · Open source

How to use security-audit-skill: install and run an AI security audit

Updated · written with AI from the project's own documentation and checked against our catalogue data

security-audit-skill is an open-source skill for coding agents that makes the agent act as a security auditor. It runs an audit in six phases and writes findings as structured JSON records with source traces. This guide covers what you need, how to install it with the Skills CLI, how to start an audit, and how to read the output.

security-auditcloudflare/security-audit-skill · ★ 56.8k · MIT

Quick start

  1. 1Check prerequisites. Confirm you have a coding agent that supports tool use and parallel sub-agents, plus Node.js installed.
  2. 2Install the skill. Run npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit, adding --global for a user-level install.
  3. 3Open the target codebase. Start your agent in the repository you want to audit or point it at that path.
  4. 4Ask for an audit. Request a security audit in plain language, for example 'security audit this codebase'.
  5. 5Decide on target execution. Only let the audit run target builds or tests inside an OS-enforced sandbox. Otherwise leads stay as needs_validation.
  6. 6Review the output. Open REPORT.md for the summary, then check findings.json and NEEDS-VALIDATION.md for source traces and open leads.
  7. 7Re-run to extend coverage. Run the audit again on the same repo so the skill can use prior ledgers and target gaps and changed source.

What you need before you install

The skill needs a coding agent with a model that supports tool use and parallel sub-agents. It also needs Node.js, because the findings and coverage-ledger validators are zero-dependency Node scripts.

If you plan to let the audit execute target code such as builds, tests or fuzzers, the README says you need an OS-enforced sandbox. That sandbox must disable external networking, use a sanitized allowlisted environment, enforce resource limits, and allow writes only to assigned scratch paths. Without it, the workflow keeps leads as needs_validation and does not run target code.

  • A coding agent that supports tool use and parallel sub-agents
  • Node.js (for the zero-dependency validators)
  • An OS-enforced sandbox if you want target code executed

Install security-audit with the Skills CLI

Install the skill with the Skills CLI from the repository URL. Use the --global flag if you want a user-level installation instead of a project-level one.

Run npx skills --help to see agent-selection and non-interactive options.

npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --global

Start an audit with a plain-language request

Open your coding agent in the codebase you want to audit, or point it at that codebase, and ask for a security audit. The skill activates when your request matches its trigger, such as a security audit, finding vulnerabilities or a pen-test of the code.

A direct codebase audit or pen-test request runs full audit mode. Security questions and focused vulnerability work use guidance mode unless you ask for report artifacts. In full audit mode, if you do not name an output directory, results go to ~/security-audit-skill/<repo-name>/run-<N>. The workflow writes inside the target repository only when you explicitly choose a directory that version control ignores.

  • Full audit: 'security audit this codebase'
  • Scoped: 'find security vulnerabilities in ./src'
  • Custom output: 'do a security review, output to ~/audits/my-project'

Understand the six phases

The skill runs the audit in order. First it maps the architecture, trust boundaries and input surfaces, and builds a coverage ledger. Next, isolated hunters check ledger units while coverage critics look for gaps. Each unique candidate then goes to a fresh verifier that tries to disprove it.

The surviving records are written to findings.json and checked against report-schema.json. Fresh agents re-verify the final source claims, and material replacements get another independent verifier. The last phase derives the human-readable reports from the verified records and the ledger.

  • Phase 1: Reconnaissance (architecture.md, coverage-ledger.json)
  • Phase 2: Coverage-led hunting
  • Phase 3: Candidate validation
  • Phase 4: Structured output (findings.json)
  • Phase 5: Independent record verification
  • Phase 6: Reporting (REPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md)

Read the findings and reports

Every finding gets one of three verdicts. confirmed means the record has a complete source trace and a bounded observed result. needs_validation means an exact fact is still unresolved, and such a record has no severity. rejected means a candidate was disproved.

Treat needs_validation items as leads, not confirmed bugs. Repeated runs on the same repo are additive: the skill reuses prior ledgers and findings to target gaps and to revalidate changed source. The README says that in its test runs a single run found roughly half of the vulnerabilities that repeated runs found in total.

  • confirmed: complete source trace and bounded observed result
  • needs_validation: unresolved fact, no severity
  • rejected: disproved candidate
  • Key output files: findings.json, REPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md

Use the attack-class files for specific targets

The skill ships with separate hunting guides. ATTACK-CLASSES.md holds core, wildcard and obvious-things prompts. Other files cover specific target types, including memory safety for native code, AI and LLM targets, web protocol and auth, client-side code, supply chain and release, cloud and deployment, RPC and messaging, resource exhaustion, data isolation, and desktop, mobile and local IPC.

Check the file list in the repository to see which guides match your target before you start a narrow audit.

  • ATTACK-CLASSES.md for general classes
  • AI-AND-LLM.md for LLM-backed targets
  • CLIENT-SIDE.md for browser code
  • SUPPLY-CHAIN-AND-RELEASE.md for CI and dependencies
  • CLOUD-AND-DEPLOYMENT.md for IaC and containers

What people use it for

  • A team using a coding agent runs a structured security review of an internal service before a release.
  • A security engineer compares AI-driven audit workflows by running the six phases on a test repository.
  • A developer exports findings.json with source traces to feed a ticketing or triage process.
  • A maintainer re-audits a repo after code changes, so the skill revalidates only changed source.

Frequently asked questions

Is security-audit-skill free to use?

The repository is licensed under MIT, and the README links to a LICENSE file in the repo. Check that file for the full terms. The skill still needs a coding agent that supports tool use and parallel sub-agents, which is a separate requirement.

What do I need to run security-audit-skill?

You need a coding agent whose model supports tool use and parallel sub-agents, and Node.js for the validators. If you want target code built or tested, you also need an OS-enforced sandbox with the controls the README lists.

How do I install security-audit-skill?

Run npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit. Add --global for a user-level installation. Run npx skills --help for other options.

Can I use it without an AI coding agent?

No. The project is a skill for coding agents and the README requires one that supports tool use and parallel sub-agents. If you want a turnkey scanner without an AI agent, this is not the right tool.

What is a needs_validation finding?

It is a lead with an exact unresolved fact and no severity. The skill uses this verdict when it cannot confirm a finding, for example when target code cannot be executed without a sandbox. Treat these as items to investigate, not confirmed vulnerabilities.

Are there alternatives or does it compare to other tools?

The project's analysis lists no comparable projects. The skill is aimed at teams that want a multi-phase, AI-driven review with machine-readable findings. For a quick lint-style check, the README suggests a simpler tool is a better fit.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

security-audit-skill suits teams already using a coding agent who want a structured, repeatable security review with source-traced, machine-readable findings. It is a poor fit if you have no AI agent, cannot provide a sandbox for target code, or only need a quick lint-style check.

Install options & downloads