docs: recommend Cloudflare's security-audit skill for the family
A personal, uncommitted install of cloudflare/security-audit-skill (MIT, reviewed at c1c8a8c), why it fits this platform's trust boundaries, how to run it, and its limits here. Its findings validator does not run on Windows, and it never executes target code without a sandbox or touches production. Ends with a proposed handling of results and one open question: vendor it or not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f37c2d677d
commit
b06df51a47
@@ -0,0 +1,91 @@
|
||||
# Security audits with Cloudflare's `security-audit` skill
|
||||
|
||||
A recommendation, not a requirement. [`cloudflare/security-audit-skill`](https://github.com/cloudflare/security-audit-skill)
|
||||
(MIT) is a skill for coding agents, Claude Code included, that runs a structured source-code
|
||||
security audit:
|
||||
|
||||
- **Reconnaissance:** maps the architecture, trust boundaries and inputs.
|
||||
- **Hunting:** isolated agents work through a coverage ledger.
|
||||
- **Validation:** every candidate goes to a fresh agent that tries to disprove it.
|
||||
- **Report:** findings are classed `confirmed`, `needs_validation` or `rejected`.
|
||||
|
||||
It is the starting point of the harness Cloudflare describes in
|
||||
[Build your own vulnerability harness](https://blog.cloudflare.com/build-your-own-vulnerability-harness).
|
||||
|
||||
I recommend it for the Dredd family because our risks sit where it looks hardest: trust
|
||||
boundaries, authorization and data isolation. Every audit was reviewed only against the commit
|
||||
noted below.
|
||||
|
||||
## Why it fits this platform
|
||||
|
||||
The family's own `CLAUDE.md` files name the places where one mistake costs the most:
|
||||
|
||||
- **Every console is one origin.** An XSS in any module's console can drive every module's API with
|
||||
the user's cookie. CSP and "untrusted bytes never execute in-origin" carry the weight.
|
||||
- **Atrium's front door** (`backend/app/frontdoor.py`). It refuses raw paths, streams requests to
|
||||
modules, rewrites `Location` and handles TLS.
|
||||
- **Who gets in:** `module_permission`, admission through unit membership (`newly_given`), and the
|
||||
moderator/administrator split.
|
||||
- **Sygna's ethical walls and evidence tables** (`conflict_check`, `aml_assessment`, `audit_log`),
|
||||
and the module roles' column-restricted grants on the shared identity schema.
|
||||
- **Supply chain:** the private `dredd-core` pin, CI tokens, and the `deploy/` kit.
|
||||
|
||||
The skill's attack-class files cover exactly these: `WEB-PROTOCOL-AND-AUTH.md`, `CLIENT-SIDE.md`,
|
||||
`DATA-ISOLATION-AND-LIFECYCLE.md`, `SUPPLY-CHAIN-AND-RELEASE.md` and `CLOUD-AND-DEPLOYMENT.md`.
|
||||
|
||||
## Install it for yourself; do not commit it
|
||||
|
||||
Per person and per checkout, so nothing third-party lands in our repositories:
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/cloudflare/security-audit-skill /tmp/security-audit-skill
|
||||
mkdir -p .claude/skills
|
||||
cp -r /tmp/security-audit-skill/skills/security-audit .claude/skills/
|
||||
echo ".claude/skills/security-audit/" >> .git/info/exclude # git never sees it
|
||||
```
|
||||
|
||||
Run that in each repository's root. For every project at once, copy the folder into
|
||||
`~/.claude/skills/` instead. Start a new Claude Code session and the skill is listed.
|
||||
|
||||
**Reviewed version:** commit `c1c8a8c` (2026-09-14). Its two validators (`validate-findings.cjs`,
|
||||
`validate-coverage-ledger.cjs`) use only Node's `fs`, `path` and `util`: no network, no child
|
||||
processes. The test files only spawn Node on those validators. Read the diff before you take a
|
||||
newer version.
|
||||
|
||||
## Using it
|
||||
|
||||
- **Guidance mode (the default)** answers focused questions with no files written. For example:
|
||||
"check `frontdoor.py` for path-confusion bugs", or "can a moderator of one module reach another's
|
||||
API?"
|
||||
- **Full audit mode** runs only when asked explicitly, for example "security audit this
|
||||
repository". It writes `REPORT.md` and `findings.json` **outside the repository**, to
|
||||
`~/security-audit-skill/<repo>/run-N`. Keep it there: findings in a law firm's software are
|
||||
sensitive until they are fixed.
|
||||
- **Runs add up.** Cloudflare reports that one run found about half of what repeated runs found,
|
||||
and later runs target the gaps the earlier ledger shows.
|
||||
|
||||
## Limits worth knowing before the first run
|
||||
|
||||
- **Not on Windows.** `validate-findings.cjs` refuses to read input without POSIX no-follow and
|
||||
non-blocking file protection: "OS no-follow and nonblocking input protection is unavailable". So
|
||||
on Windows a full audit cannot complete Phase 4. Run full audits on Linux or macOS: WSL, or a
|
||||
Claude Code cloud session on the repository. Guidance mode works anywhere.
|
||||
- **No target code without a sandbox.** The skill executes builds and tests only inside an
|
||||
OS-enforced sandbox with no network. Without one it reads source only and leaves runtime questions
|
||||
as `needs_validation`. That is safe, just less complete.
|
||||
- **Never against production.** The skill does not probe deployed endpoints or real data by
|
||||
design, and nobody should point it at the VPS.
|
||||
- **Heavy runs.** A full audit runs many agents in parallel. Scope it to one repository, or to one
|
||||
area such as `backend/app/frontdoor.py` plus `deps.py`, on smaller machines.
|
||||
|
||||
## Proposed handling of results
|
||||
|
||||
1. Findings go to the repository owner (Alpaq92) first, privately: an issue in this private
|
||||
repository, never a public one.
|
||||
2. `confirmed` findings get a fix PR that references the record; `needs_validation` ones get a
|
||||
named owner and the exact fact still missing.
|
||||
3. Keep the `findings.json` of each run outside the repository, so the next run can build on it.
|
||||
|
||||
**Open question:** should we vendor the skill under `.claude/skills/` so everyone has the same
|
||||
version? It is 360 KB of third-party files that change upstream, so for now this page recommends
|
||||
a personal install.
|
||||
Reference in New Issue
Block a user