Cloudflare security-audit: Getting Started with the AI Security Audit Skill
Cloudflare recently released an open source skill called security-audit, designed to carry out a real security audit of your source code, with a methodology, evidence, and an actionable report. Here is an introduction and a practical walkthrough.
The security-audit skill released by Cloudflare is aimed at development teams and security teams that want to review an application before production, but also at anyone maintaining tools, extensions, or open source projects ! In other words, anyone who codes but does not have a pentester on hand.
In this article, I will show you this skill, then install it with the Skills CLI (npx skills) for Claude Code, either globally or per project. After that, we will see how to use it on a deliberately vulnerable application, how to read the results, and what its limitations are.
In short: how do you install the security-audit skill?
Cloudflare's security-audit skill is installed with Vercel Labs' Skills CLI, which requires Node.js 22.20 or later. To make it available across all your Claude Code projects, run:
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit -a claude-code -gThe skill is then copied to ~/.claude/skills/security-audit/. Next, launch Claude Code in the folder containing the code you want to analyze and request a security audit, or invoke /security-audit directly. Without the -g option, installation is limited to the current project.
What is Cloudflare's security-audit skill?
What is a skill for an AI agent?
A skill (or “Agent Skill”) is a folder containing a SKILL.md file: a YAML header with a name and description, followed by instructions in Markdown. The folder can also include reference files and scripts. The agent does not load everything all the time: it reads the description, and it only loads the full skill content when your request matches its purpose.
This format is open and defined by the Agent Skills specification. It is supported by Claude Code, but also by Codex, Cursor, Gemini CLI, GitHub Copilot, and OpenCode, among others. A skill does not add a new technical capability to the agent (unlike an MCP server): it gives it know-how and a working method.
A skill derived from Cloudflare's harness
The security-audit skill turns a coding agent into a security auditor. It was released by Cloudflare alongside the article Build your own vulnerability harness. What is interesting is that Cloudflare describes the system it uses internally to look for vulnerabilities in its own code repositories. Given Cloudflare's importance in the global ecosystem, it is hard not to take a close look at this skill.
According to the project's README, this skill is the starting point for the system developed by Cloudflare: it was designed to audit a single repository before evolving into a multi-stage analysis pipeline applied across all of Cloudflare's repositories. What you need to understand is that the full harness is not published yet. But the skill itself is available and usable by everyone.
The six phases of a full audit
As for this skill, it is designed to perform a complete audit, orchestrating several isolated agents across six phases:
- Reconnaissance: mapping the architecture, trust boundaries, and entry points in the
architecture.mdfile. Based on this map, the skill creates a list of everything that must be reviewed: each entry point, crossed with the relevant trust boundary and the type of attack to test. This list, called the coverage plan, is stored incoverage-ledger.jsonand indicates, for each item, whether it has been handled. - Vulnerability hunting, area by area: each hunting agent receives one item from this list, meaning a specific area of the code and a type of attack to test. “Critic” agents then identify overlooked areas.
- Candidate validation: each candidate vulnerability is handed to a new agent whose role is to try to prove that it is a false positive.
- Structured output: the results are written to
findings.jsonand then validated against a JSON schema. - Independent verification: other agents, which did not participate in the discovery, verify the final claims in the source code.
- Report: generation of
REPORT.md,FINDINGS-DETAIL.md, andNEEDS-VALIDATION.mdfrom the verified results.
The key principle used here is adversarial validation: the agent that verifies a finding is never the one that discovered it. This is what sets this approach apart from a simple “find vulnerabilities in this code” prompt, which often produces false positives presented with great confidence.

Three verdicts for every lead
Each analyzed lead ends with one of these three verdicts:
| Verdict | Meaning | Severity level |
|---|---|---|
confirmed | Vulnerability established, with a complete trace in the source code and an observed result | Yes (from informational to critical) |
needs_validation | Lead supported by the code, but blocked by a specific fact that cannot be verified (configuration, proxy behavior, etc.). This is the status used for flaws not verified “in practice” in a sandbox. | No |
rejected | Lead disproved during validation | No |
Note: the skill does not turn a hypothesis into a vulnerability. A lead that depends on an element missing from the repository stays in needs_validation, with the exact fact to verify. Likewise, the absence of a defense-in-depth layer is not considered a flaw if another layer already blocks the attack: it is reported as a hardening opportunity.
To do this, this skill released by Cloudflare relies on a SKILL.md file, fourteen companion Markdown files (reconnaissance, hunting, validation methodology, and attack classes by domain: web and authentication, client-side, AI and LLM, supply chain, cloud, protocols, memory safety, etc.), a JSON schema, and two JavaScript validators with tests.
Prerequisites
If, after reading this introduction to the skill, you want to install it, note that to follow this tutorial you need:
- A code agent that supports subagents: I am using Claude Code here. If you have not installed it yet, follow our tutorial Installation and Use of Claude Code: First Steps.
- Node.js 22.20 or later: this is the minimum version required by the Skills CLI. It also covers the skill's validators. Check your version with
node --version. - Git: the Skills CLI clones the skill repository.
- Source code to audit: for the walkthrough, we will use a deliberately vulnerable application.
- Ideally, a dedicated machine or VM: we will see why in the section about the sandbox.
Installing the skill with the Skills CLI
To install this skill, it is recommended to use the Skills CLI, an open source command-line tool developed by Vercel Labs and distributed on npm under the name skills. Its role is simple: fetch one or more skills from a Git repository (GitHub, GitLab, Azure Repos, any Git URL) or a local folder, then place them in the correct directory for each agent. It supports nearly 80 agents, including Claude Code, Codex, Cursor, and OpenCode.
The Skills CLI is not an Anthropic tool. You can absolutely do without it and install the skill manually.
List the repository contents before installing
Let's start by looking at what Cloudflare's repository contains, without installing anything. The --list option displays the available skills:
npx skills add https://github.com/cloudflare/security-audit-skill --listThe repository contains a single skill, named security-audit, which is exactly what we would expect.

Global installation for Claude Code
Global installation makes the skill available in all your projects. This is the choice I recommend for a cross-cutting tool like this one, which is not meant to live inside the audited repository. At the very least, you will be able to audit every project you develop with AI, including (and especially?) if it is a vibe-coded tool.
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit -a claude-code -gA few explanations about the options used:
--skill security-audit(or-s) : selects the skill to install. Without this option, the CLI lets you choose among the repository's skills.-a claude-code(or--agent) : targets a specific agent. Without this option, the CLI detects the agents installed on your machine and asks which ones to use.-g(or--global) : installs the skill in your personal directory rather than in the current project.
You must confirm the skill installation with yes. The operation is simple and quick.

After running this command, the skill files are stored in ~/.claude/skills/security-audit/, which is Claude Code's personal skills directory.
ls ~/.claude/skills/security-audit/
total 696
-rw-r--r--@ 1 florian staff 10617 Oct 20 15:40 AI-AND-LLM.md
-rw-r--r--@ 1 florian staff 15695 Oct 20 15:40 ATTACK-CLASSES.md
-rw-r--r--@ 1 florian staff 8594 Oct 20 15:40 CLIENT-SIDE.md
-rw-r--r--@ 1 florian staff 8291 Oct 20 15:40 CLOUD-AND-DEPLOYMENT.md
-rw-r--r--@ 1 florian staff 7798 Oct 20 15:40 DATA-ISOLATION-AND-LIFECYCLE.md
-rw-r--r--@ 1 florian staff 8739 Oct 20 15:40 DESKTOP-MOBILE-AND-LOCAL-IPC.md
-rw-r--r--@ 1 florian staff 22446 Oct 20 15:40 HUNTING.md
-rw-r--r--@ 1 florian staff 10513 Oct 20 15:40 MEMORY-SAFETY-AND-BINARY.md
-rw-r--r--@ 1 florian staff 7483 Oct 20 15:40 PROTOCOLS-RPC-AND-MESSAGING.md
-rw-r--r--@ 1 florian staff 15902 Oct 20 15:40 RECONNAISSANCE.md
-rw-r--r--@ 1 florian staff 14494 Oct 20 15:40 report-schema.json
-rw-r--r--@ 1 florian staff 7476 Oct 20 15:40 RESOURCE-EXHAUSTION-AND-AVAILABILITY.md
-rw-r--r--@ 1 florian staff 22026 Oct 20 15:40 SKILL.md
-rw-r--r--@ 1 florian staff 7258 Oct 20 15:40 SUPPLY-CHAIN-AND-RELEASE.md
-rwxr-xr-x@ 1 florian staff 33522 Oct 20 15:40 validate-coverage-ledger.cjs
-rw-r--r--@ 1 florian staff 28483 Oct 20 15:40 validate-coverage-ledger.test.cjs
-rwxr-xr-x@ 1 florian staff 28806 Oct 20 15:40 validate-findings.cjs
-rw-r--r--@ 1 florian staff 26384 Oct 20 15:40 validate-findings.test.cjs
-rw-r--r--@ 1 florian staff 17843 Oct 20 15:40 VALIDATION-AND-REPORTING.md
-rw-r--r--@ 1 florian staff 12300 Oct 20 15:40 WEB-PROTOCOL-AND-AUTH.mdManaging the skill day to day
The Skills CLI includes global commands for managing skills, including a command to update or uninstall it. This may be useful later:
# List skills installed at the user level
npx skills ls -g
# Check whether an update is available
npx skills check
# Update the skill
npx skills update security-audit
# Uninstall the skill from the user level
npx skills remove security-audit -gInstalling the skill without the Skills CLI
Because a skill is just a folder, you can install it manually, which also lets you keep full control over the installed version:
# Clone the skill repository into a working directory
git clone --depth 1 https://github.com/cloudflare/security-audit-skill.git ~/src/security-audit-skill
# Create Claude Code's personal skills directory if it does not exist
mkdir -p ~/.claude/skills
# Copy the skill folder
cp -r ~/src/security-audit-skill/skills/security-audit ~/.claude/skills/For a project-level installation, copy the folder into .claude/skills/ at the root of the repository. Claude Code watches these directories and picks up a new skill without restarting.
Getting started in Claude Code
If you have made it this far while following the steps, the skill should now be installed. To verify it, in Claude Code, the /skills command displays the list of available skills: security-audit should appear there.

Two operating modes
Before launching anything, you need to understand that the skill works in two modes:
- Guidance mode (default): for a security question, a targeted review, or the analysis of a specific lead, the agent uses only the useful parts of the skill. It does not create an output folder and does not run the six phases.
- Full audit mode: triggered by an explicit request for a security audit or pentest of a codebase, a “full” or “end-to-end” review, or a request for a report. The agent then runs the six phases and produces the result files.
If your request is ambiguous, the skill tells the agent to ask you a question before creating files. This is a good reflex, because a full audit is long and consumes a lot of tokens.
Preparing a test bed with DVWA
For a first hands-on test, I recommend not starting with a sensitive project. Analyze a small vibe-coded tool... Or instead use a deliberately vulnerable application whose flaws you already know: this will let you judge the quality of the results. DVWA (Damn Vulnerable Web Application), a PHP / MariaDB application built for training, works very well. But we will see that it can also be problematic.
# Create a lab folder for dvwa and clone the DVWA project
mkdir -p dvwa && cd dvwa
git clone https://github.com/digininja/DVWA.gitWarning: DVWA is vulnerable by design. We only need its source code: do not deploy it, and especially not on an Internet-facing server.
- Project link: DVWA GitHub repository.
Isolating execution: Claude Code's sandbox and its limits
The skill is very strict on this point. By default, it only analyzes source code in read-only mode. It only accepts running code from the target (builds, tests, scripts, fixtures) inside an operating-system-enforced sandbox, which must meet all of these conditions:
- No external network access
- An empty environment, populated only from an explicit list of variables
- A read-only target and toolchain, with writes limited to a dedicated working directory
- Explicit limits on CPU, memory, process count, file size, and time
If one of these conditions cannot be guaranteed, the skill does not run anything: the identified lead remains in needs_validation, along with a validation plan. It also does not install dependencies and forbids probing deployed services or production environments.
The challenge is setting up this sandbox.... Claude Code does have a native sandbox for shell commands, disabled by default. It relies on Seatbelt on macOS (native), and on bubblewrap and socat on Linux and WSL2:
sudo apt-get install bubblewrap socatThen, in a Claude Code session, the /sandbox command opens the configuration panel. Once the sandbox is enabled, shell commands can no longer write outside the allowed folders, and network traffic goes through a local proxy that only allows the domains in your list (empty at first).
Below is the sandbox configuration, with the idea that it should truly be a strict sandbox.


But let's be honest, enabling this sandbox is not enough. On its own, it still does not satisfy all the conditions required by Cloudflare's skill. To go as far as running tests on the audited code, the cleanest solution is still to work inside a throwaway virtual machine (on your hypervisor or Proxmox lab, for example), with no network access to your other machines and no sensitive credentials. For a first hands-on test, static analysis is more than enough: that is also the skill's default behavior.
First use on a specific request
Move into the DVWA directory and start Claude Code:
cd DVWA
claudeLet's begin with a targeted request, which remains in guidance mode. Cloudflare explains that you can ask for a security audit in one direct sentence, such as: "security audit this codebase". But you can also give more specific instructions (which is good or bad, depending on the context). For example:
/security-audit Is the file vulnerabilities/sqli/source/low.php vulnerable to SQL injection? Explain the data flow, from user input to the query, and propose the minimal fix.Because the request concerns security, the skill should load automatically, but I personally prefer to make it explicit via the /security-audit prefix. The agent replies in the conversation, without creating a report folder. This mode is practical day to day, for example to challenge a function before a code review.
Here is a partial view of the response obtained:

The code analysis shows that there is indeed an SQL injection security flaw, but it still remains in a to-be-confirmed state: it has not been verified in a sandbox. In other words, it was identified through code analysis, but not in practice.
Running a full audit
Let's now move on to the full audit. You can simply ask it to perform a security audit of the codebase, or frame the request: profile, scope, output folder, and budget. I am saying this because it can easily launch 50 or 60 agents in parallel to perform an analysis, which can quickly consume a lot of tokens.
/security-audit Perform a full security audit of this repository.
Profile: quick.
Scope: the vulnerabilities/ folder only.
Static analysis only: do not run any code from the repository.
Budget: 25 agents maximum.
Write the results to the run-1 subfolder.These parameters match what the skill provides:
- The profile:
quickperforms a single pass with grouped coverage units, ideal for a first approach.standard(default) applies the full workflow.deepbreaks things down more finely and increases verification, for sensitive or large targets. - The scope: an audit can target specific paths, a subsystem, or the difference between two commits. Anything outside scope is marked
out_of_scope, never “covered”. - The budget: expressed as the maximum number of agent invocations. The skill first reserves the agents needed for reconnaissance, coverage critics, and validation before assigning the rest to hunters. If the budget is insufficient, the audit is declared incomplete rather than rushed.
- The output folder: by default, the skill writes to
~/security-audit-skill/<repository-name>/run-<N>. Here, it will be in a subfolder, but you can adjust it to your preferences.
If you run it without specifying your request, it will probably ask the question. For example:


During the audit, you will see Claude Code launch several subagents in parallel:

When performing these audit tests on DVWA, I ran into an interesting case. The skill stopped abruptly because of Claude Opus 5.5 safeguards. Indeed, even though I have a Claude subscription, I have the same restrictions as everyone else who is not part of the Cyber Verification Program. So I was blocked, but by rerunning the analysis with a different scope (shown above), it worked. I was also able to run full audits on internal tools developed with Claude.
What the results folder contains
At the end of a full audit, the output folder contains the following files:
| File | Contents |
|---|---|
run-metadata.json | Execution parameters: repository, audited commit, profile, scope, budget, status |
architecture.md | Summary of the architecture and trust boundaries |
coverage-ledger.json | Coverage plan: each unit, its status, and the agents that handled it |
findings.json | All structured results (confirmed, needs_validation, rejected) |
REPORT.md | The summary report, to read first |
FINDINGS-DETAIL.md | The details of each confirmed vulnerability |
NEEDS-VALIDATION.md | The unresolved leads, with the exact blocker and validation steps |
agents/ | The working folders for each agent |
When it finishes its work, it clearly mentions these files. Ideally, you should have a Markdown file viewer or ask it to generate a report in document form so that the result is easy to read.

Reading and using the report
The REPORT.md file starts by reminding you of the profile, scope, budget consumed, and audited commit. It then presents a table of confirmed vulnerabilities (severity, title, crossed boundary, observed result), followed by a separate table of leads to validate.
The skill applies a severity scale based on demonstrated impact:
| Severity | Examples given by the skill |
|---|---|
critical | An unauthenticated attacker gets code execution, full data access, or control of arbitrary accounts |
high | Complete bypass of a security control: authentication bypass, cross-tenant access, stored XSS targeting other users, authenticated code execution |
medium | A real boundary violation, but with limited impact or uncommon conditions |
low | Disclosure of non-sensitive internal information, or an effect that requires a lot of effort for little gain |
informational | Confirmed observation with minimal impact, useful mainly as a building block in a larger attack |
For each confirmed vulnerability, FINDINGS-DETAIL.md provides the code trace (files and lines), exploitation conditions, the recommended minimal fix, and regression tests. The skill describes the fixes, but never modifies the audited code. It is up to you to apply them, potentially by asking Claude Code to do so later from findings.json, in a separate session.

Rerun the audit to improve coverage
One pass is not enough. Cloudflare states this clearly in the README: in its tests, a single run found about half of the vulnerabilities discovered across multiple runs. The skill is designed for this: successive runs on the same repository are cumulative. With each new pass, it rereads the coverage plans and previous results, targets uncovered areas, revalidates what changed in the code, and never considers an unprocessed area to be safe.
So you can, and I would even say you should, rerun the audit several times. Here is an example prompt in that spirit.
/security-audit Rerun a full audit of this repository in standard profile, taking previous runs into account. Write the results to ~/audits/dvwa/run-2.You could also go further in the prompt wording, which may help optimize your budget:
/security-audit Perform a full, targeted security audit of this repository that I am authorized to audit.
Scope: the code that is supposed to be safe (login, session, setup, level changes, CSRF tokens, API, and impossible.php files). The low, medium, and high files are intentional flaws and are out of scope. The .github/ folder is out of scope.
Expected policy: modules are restricted to authenticated users. At the impossible level, each module must resist the attack it demonstrates. Resetting the database via setup.php is a documented feature.
Profile: quick.
Budget: 30 agents maximum.
Record the audited commit and repository state.
Before running any code from the repository, indicate which sandbox controls are actually available. If they are missing, keep the exact blocker visible.
Write the results to ~/audits/dvwa/run-2 and clearly distinguish validated results from blocked leads.Conclusion
Cloudflare's security-audit skill gives your code agent what security analyses assisted by AI often lack most: a method. Coverage plan, organized bug hunting, validation by independent agents, distinct verdicts, and a structured report: this is a long way from the simple “find vulnerabilities” prompt. It installs quickly with the Skills CLI, either globally or per project, and works just as well with Claude Code as with other compatible agents.
The problem is the sandbox story: there is no clear explanation of how to create and configure it. As a result, most flaws remain pending validation, because the “real-world” evaluation mechanism cannot be triggered. This is something I will be researching soon.
In the meantime, here are a few things to keep in mind:
- Plan for token usage: a full audit mobilizes many subagents. Start with the
quickprofile and a narrow scope, and set a budget in agent count. - Audit a specific commit: the skill records the audited commit and flags a locally modified repository. Work on a clean, up-to-date copy so the report matches an identifiable code state.
- Keep a human in the loop: even with adversarial validation, every confirmed vulnerability should be reviewed before remediation. Cloudflare itself admits it cannot measure its false negative rate, due to the lack of a labeled dataset: the absence of a result does not prove the absence of a flaw.
- Do not treat this as a pentest: the skill works on source code and refuses to probe deployed environments. Anything that depends on the real configuration (reverse proxy, WAF, HTTP headers, identity provider) stays in
needs_validation. A penetration test on the real environment remains complementary and necessary. - Do not audit just any repository: do not run the skill on a repository you are not authorized to analyze.


