# The Security Run Guide

How to run Cloudflare's open-source security skill on your own app with your coding agent: a small first run, a report you can read, and fixes you approve one at a time.

**The skill is Cloudflare's, not mine.** It is called `security-audit`, it lives at [github.com/cloudflare/security-audit-skill](https://github.com/cloudflare/security-audit-skill), and it is free under the [MIT licence](https://github.com/cloudflare/security-audit-skill/blob/main/LICENSE). Cloudflare released it on 18 June 2026 with the post [Build your own vulnerability harness](https://blog.cloudflare.com/build-your-own-vulnerability-harness/). This guide is my part: how I run it. The facts about the skill here were checked against its files at commit `c1c8a8c` (14 September 2026) on 24 November 2026.

**How to use this file**
1. Install the skill (below).
2. Open your coding agent (for example Claude Code) inside your app's folder.
3. Attach this file in the chat (drag it in, or paste it) and say: **run my first security audit**.
4. If you stop and come back later: open the agent in the same folder, attach this file again and say **read SECURITY-PROGRESS.md and carry on**. (The agent keeps that file next to the audit reports, not in your app's folder.)

Version 1.2, November 2026.

## Install the skill

This is the command from [Cloudflare's README](https://github.com/cloudflare/security-audit-skill#installation):

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

**The easy way:** open your coding agent in your app's folder and say "run this command to install a skill", then paste the command. Run from inside an agent, it installs without asking anything (tested in Claude Code on 24 November 2026).

**If you run it in a terminal yourself:** it opens a list and asks which agents to install to. Find yours in the list (type to search), press space to tick it, then Enter. Some agents sit in a group that is always included, so they need no tick. In my test Claude Code was not ticked by default, and pressing Enter straight through did not install it for Claude Code. For Claude Code you can skip the list with:

```bash
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --agent claude-code --yes
```

Good to know:
- Add `--global` to install it for every project on your computer. The command runs through the [Skills CLI](https://skills.sh) with `npx`, which comes with Node.js.
- The installer shows a "Security Risk Assessments" box from three scanners. In my test on 24 November 2026 it read Gen: Safe, Socket: 0 alerts, Snyk: Med Risk. It ends with the line "Review skills before use; they run with full agent permissions." That is true of any skill. This one is open source, so you can read every file in [the repo](https://github.com/cloudflare/security-audit-skill/tree/main/skills/security-audit) first.
- Without `--global`, it adds `.claude/skills/security-audit` and `skills-lock.json` to your app's folder, and `.agents/` too if you used the plain command. Those are the tool, not your app.

Installing starts nothing. The audit starts when you ask your agent for it.

## What you need ([README, "Requirements"](https://github.com/cloudflare/security-audit-skill#requirements))

| You need | Why |
|---|---|
| A coding agent whose model can use tools and run sub-agents side by side | The skill hands the work to separate agents: some map, some hunt, others check |
| Node.js | The skill's two checker scripts run on it |
| An OS-enforced sandbox (a locked area on your computer where code runs with no internet and no reach into your files), if you want confirmed findings | The skill only marks a finding `confirmed` after it has safely run a test on your code. Without a sandbox it does not execute your code: it keeps each lead as `needs_validation` and tells you what is still unproven. No sandbox is fine for a first run |

## What the skill does ([README, "What it does"](https://github.com/cloudflare/security-audit-skill#what-it-does))

| Phase | Cloudflare's name | In plain words |
|---|---|---|
| 1 | Reconnaissance | Agents map your code base: how it is built, where input comes in, and where it should stop trusting what it is given |
| 2 | Coverage-led hunting | Separate hunter agents look for weaknesses, area by area, and a critic looks for gaps |
| 3 | Candidate validation | A fresh agent tries to disprove every candidate |
| 4 | Structured output | Results are written to `findings.json` and checked by a script |
| 5 | Independent record verification | Fresh agents check the final records against your source |
| 6 | Target-neutral reporting | You get `REPORT.md`, `FINDINGS-DETAIL.md` and `NEEDS-VALIDATION.md` |

**What it does not do**
- It does not change your code. [SKILL.md](https://github.com/cloudflare/security-audit-skill/blob/main/skills/security-audit/SKILL.md): "The audit describes fixes; it does not modify target source." You decide which fixes go in.
- It does not promise your app is safe. The skill tells the agent "Never imply that one run exhausts the target", and Cloudflare's README says that in their test runs "a single run found roughly half of the vulnerabilities that repeated runs found in total."

## What it costs in usage

The skill counts spend in agent invocations, meaning how many separate agents it starts ([SKILL.md, "Cost budget"](https://github.com/cloudflare/security-audit-skill/blob/main/skills/security-audit/SKILL.md)). There is no fixed number: it follows the size of your code base, the profile and the budget you set.

- **Profiles** (SKILL.md, "Run profiles and scope"): `quick` is a bounded pass for small targets, re-runs, or a fast first look. `standard` is the default. `deep` is for high-stakes or large targets.
- **Budget:** optional in the skill. If you set one, it is the maximum number of agent invocations across all phases. The smallest `quick` run reserves four reconnaissance agents, one critic and at least one verifier (six). `standard` and `deep` reserve a second critic (seven). The skill also says a budget can still be exceeded if a run turns up many candidates, and that it must tell you when that happens.
- **My own runs:** two audits of apps I work on used 62 and 75 agent invocations. Without a sandbox, expect leads and no confirmed findings (see "What you need" above).
- **So start small.** On a [Claude Pro plan (about $20 billed monthly) or Max (from $100)](https://claude.com/pricing) (read 23 November 2026), a run that size is a lot of your usage in one go.

---

## For the agent: read this whole file before you answer

You are helping someone run their first security audit of their own app with Cloudflare's `security-audit` skill. They may not be a security person. When they say "run my first security audit" (or "start", "audit my app"), run the stages below in order and say which stage you are on ("Stage 2 of 5: scope and budget").

### Rules for you
- **The skill is the authority on how the audit runs.** This file only wraps it: setup, a small first run, reading the report, applying fixes. If this file and the skill's `SKILL.md` disagree, follow `SKILL.md` and tell the user.
- **Plain words.** Explain each step in one or two short sentences. Give every security term a one-line meaning the first time ("an injection, where text a visitor types gets run as a command").
- **One question at a time.**
- **Their own code only.** Before anything else, ask them to confirm this is their app or one they are allowed to test. If not, stop.
- **Source and local only.** Never test a live site, a production database or anyone else's service. Never send their code, findings or secrets anywhere.
- **Do not change their code during the audit.** Fixes come in Stage 5, one at a time, each after their yes.
- **Never promise safety.** Do not say "your app is secure", "all clear" or "nothing to worry about". Say what was covered, what was not, and what was found.
- **Never invent a finding** and never raise a severity above what the report says. A `needs_validation` lead is not a confirmed vulnerability.
- **Keep your place.** In Stage 1, create the folder `~/security-audit-skill/<repo-name>/` and keep a short progress file at exactly `~/security-audit-skill/<repo-name>/SECURITY-PROGRESS.md`, where `<repo-name>` is the name of the app's folder: the stage, their answers, the run folder, which fixes are approved, applied or skipped. If the session restarts, they say "read SECURITY-PROGRESS.md and carry on": look for it at that path. If it is missing, say so and offer to start again from Stage 1.
- **The reports are private.** They list weak points in the app. Tell the user once: keep the run folder off any public repository and do not paste findings into a public issue, forum or chat.
- **Secrets.** If you see a password, key or token in the code or the report, say where it is and never print it back in full. Give the same rule to every sub-agent you start.

### Stage 1: check the setup
1. Ask: is this your own app, or one you are allowed to test?
2. Check the skill is installed: look for a `security-audit` skill with its `SKILL.md`, in any one of `.claude/skills/security-audit/`, `.agents/skills/security-audit/` or your own user-level skills folder. If it is missing, offer to run the install command from the top of this file for them. If it is there but you cannot load it as a skill (it was installed in this session, or it sits only in `.agents/skills/`), read its `SKILL.md` from that folder and follow it as written. If that does not work, create the progress file now (step 7), then ask them to restart the agent and say the resume line.
3. Check Node.js: run `node --version`. If it is missing, tell them to install it from [nodejs.org](https://nodejs.org) and wait.
4. Check you can run sub-agents. If you cannot, say so plainly: the skill needs them, and the audit will not work as designed.
5. Check for a sandbox. If you have an OS-enforced sandbox with no outside network, say so. If not, tell them in plain words: "During the audit I will read your code but not run it. The skill only marks something confirmed after a safe test run, so expect the results in your report to be leads marked needs_validation, each with the exact thing that is still unproven. A lead with a clear trail through your code is still worth a close look." Do not set up a sandbox yourself on a first run. If Docker or another container tool is installed, you may say that a later run can use containers as the sandbox, that it is an advanced step, and that you would do it only after their yes. If they say yes, that is for the later run, not this one. Before that run, read the skill's "Universal execution safety" section in `SKILL.md` and enforce all of it, not a summary. That includes no outside network, an empty environment built from an allowlist, their code and tools mounted read-only, writes only to scratch, limits on CPU, memory, processes, disk and time, no installing or downloading dependencies, dummy keys only, and no access to their home folder, their `.env` files, credentials or sockets. If any one cannot be enforced, do not run their code and say which one. Then carry on.
6. Check the code is saved: run `git status`. If there are unsaved changes, suggest a commit first, so the audit reviews a known version. The install adds `.claude/skills/security-audit`, `skills-lock.json` and sometimes `.agents/`: say what they are, commit only those three in a commit of their own (nothing else from `.claude/`), and keep them out of the audit scope. They are the tool, not the app. If the folder is not a git repository, say so. The audit can still run. Before Stage 5, offer to run `git init` and make a first commit, after their yes.
7. Create `~/security-audit-skill/<repo-name>/SECURITY-PROGRESS.md` and tell them where it is.

### Stage 2: scope and budget
Ask these, one at a time:
1. What does the app do, in one sentence?
2. Which parts matter the most? Offer examples: sign-in and accounts, payments, file uploads, admin pages, anything that reads or writes other people's data.
3. How much usage are you willing to spend on this first run: a little, or a lot?

Then propose a plan and wait for a yes:
- **First run (my advice):** the `quick` profile with a budget of 15 agent invocations. For a small app (one service, a few dozen source files), cover the whole repository and list the parts they named as the priority. For a larger one, scope it to the parts they named. Tell them the skill reserves six of those before any hunting (four to map, one critic, one verifier), and that the skill will say so if 15 cannot fund the plan for their code base.
- **If they want a bigger pass:** the `standard` profile over the whole repository. Tell them there is no fixed cost. For a sense of scale, two audits of apps I work on used 62 and 75 agents, with different profiles and scopes, so theirs will differ. Ask them to set a budget number they are fine with.
- Say plainly that a quick or scoped run is a partial pass: the report will list what was left out, and nobody will have looked at those parts.

### Stage 3: run the audit
1. Start a full audit through the skill, with a request like: "Do a security audit of this codebase. Profile: quick. Scope: [THE WHOLE REPOSITORY, OR THE PARTS THEY NAMED]. Budget: 15 agent invocations." Use the profile, scope and budget they agreed to.
2. Let the skill run its six phases as written. Do not skip independent verification to save usage. In `quick` the skill itself uses one fresh verifier per candidate for both checks. That is as designed.
3. Output goes outside their repository by default, to `~/security-audit-skill/<repo-name>/run-<N>`. Tell them the folder.
4. Tell them when each phase starts, in one line. If the skill says the budget cannot cover the plan, stop and ask: a larger budget or a narrower scope (and, on `standard` or `deep`, a smaller profile).
5. If the run ends as incomplete, say so and say why. Do not present it as a finished audit.

### Stage 4: read the report with them
Open `REPORT.md` in the run folder and walk them through it in this order:
1. **What was covered and what was not:** the profile, the scope, agents spent against the budget, and the deferred and out-of-scope parts. Read that list out by name, say nobody looked at those parts, and offer the next run on them.
2. **Confirmed findings:** for each one, give the severity, what an attacker could do in one sentence, where it is in the code, and the fix the report describes. The severities are the skill's: critical, high, medium, low, informational.
3. **Needs validation:** leads the skill could not prove. For each, say what is unproven and what check would settle it. These have no severity.
4. **Hardening notes:** good-practice gaps that are not vulnerabilities.
5. A run can end with zero confirmed findings. Say that plainly, with the limits of what was covered, and do not pad the list. `FINDINGS-DETAIL.md` only has content when something is confirmed.

Then ask which results they want fixed: confirmed findings first, highest severity first, then `needs_validation` leads where the report shows a complete path through their code.

### Stage 5: fix what they approve (this stage is my advice, not part of Cloudflare's skill)
For each result they approved, one at a time:
1. Make a new branch from their main branch, for example `security/fix-login-check`.
2. Show the smallest change that fixes it and explain it in two sentences. For a confirmed finding, use the fix the report describes. For a lead, the report has no fix section, so propose one and say it is your proposal.
3. Wait for their yes. Then apply it.
4. Add or update a test that fails without the fix and passes with it, where the project has tests. Before you run anything, check what the tests connect to. If a test or its settings (for example a `.env` file) point at a live database, a paid API or a real service, do not run it: say so and ask. Run only tests that stay on their computer. If there are no tests, say so, and say the fix is unverified until they try the app.
5. Commit with a plain message. Update `SECURITY-PROGRESS.md`.
6. If a finding involves a leaked password, key or token, tell them to change that secret at the provider themselves. Removing it from the code does not undo the leak.

When the approved fixes are in:
- Suggest they review each branch and merge it themselves.
- Offer a second run on the changed code. The skill reads its earlier run and aims at the gaps and at what changed, so runs add up.

### When to run it again
- After a big change: new sign-in, payments, uploads, a new API.
- Before a launch.
- When a library you use announces a security fix: update it first, then run the audit again if your code leans on the part that changed. The CVE Program [published 20,696 CVE records in the second quarter of 2026 and 36,962 in the third](https://www.cve.org/about/Metrics) (read 23 November 2026). Those are published flaws across all software, so keep your dependencies updated as well.

### What to tell them at the end
- Where the reports are, and that they should stay private.
- What was fixed, what was left and why.
- What was not covered in this run.
- That this audit lowers risk and does not prove the app is safe. For an app that handles money, health data or many users' private data, a professional security review is still worth it.
