Skip to content
Back to search

security-audit-skill

A coding-agent skill for multi-phase security audits with independently verified, machine-readable findings

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cloudflare-security-audit-skill/badge.svg)](/listings/cloudflare-security-audit-skill)

HTML

<a href="/listings/cloudflare-security-audit-skill"><img src="/api/listings/cloudflare-security-audit-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the skill with the [Skills CLI](https://skills.sh):

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

Use `--global` for a user-level installation:

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

Run `npx skills --help` for agent-selection and non-interactive options.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 106 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # security-audit
  2. A coding-agent skill that turns your agent into a security auditor. It orchestrates isolated agents through reconnaissance, coverage-led hunting, candidate validation, structured output, independent record verification, and target-neutral reporting.
  3. This is the skill that seeded Cloudflare's vulnerability discovery harness, described in [Build your own vulnerability harness](https://blog.cloudflare.com/build-your-own-vulnerability-harness). The harness grew into a multi-stage, fleet-wide system; this skill is the single-repo starting point it evolved from.
  4. ## What it does
  5. The skill runs a structured audit in six phases:
  6. 1. **Reconnaissance** -- map architecture, trust boundaries, input surfaces, prior evidence, and deterministic coverage in `architecture.md` and `coverage-ledger.json`.
  7. 2. **Coverage-led hunting** -- assign isolated hunters from ledger units, record their checks, and use coverage critics to find gaps.
  8. 3. **Candidate validation** -- give every unique candidate to a fresh verifier that tries to disprove it.
  9. 4. **Structured output** -- write `confirmed`, `needs_validation`, and `rejected` records to `findings.json` and validate them against `report-schema.json`.
  10. 5. **Independent record verification** -- fresh agents verify final source claims. Material replacements receive another independent verifier.
  11. 6. **Target-neutral reporting** -- derive `REPORT.md`, `FINDINGS-DETAIL.md`, and `NEEDS-VALIDATION.md` from the verified records and coverage ledger.
  12. The parent runs `validate-coverage-ledger.cjs` after creating the ledger and after each later ledger update. It runs `validate-findings.cjs` in Phase 4 and again after every Phase 5 replacement.
  13. The verdicts are distinct: `confirmed` has a complete source trace and bounded observed result, `needs_validation` has an exact unresolved fact and no severity, and `rejected` records a disproved candidate.
  14. Multiple runs against the same repo are additive. The skill uses prior ledgers and findings to target gaps, revalidate changed source, and carry forward current-source evidence without treating stale or unresolved work as covered.
  15. ## Files
  16. | File | Purpose |
  17. |------|---------|
  18. | `SKILL.md` | Setup, core principles, platform terminology, workflow overview, and audit anti-patterns |
  19. | `RECONNAISSANCE.md` | Phase 1 reconnaissance prompts and synthesis instructions |
  20. | `HUNTING.md` | Phase 2 orchestration, hunting methodology, and validation rules |
  21. | `ATTACK-CLASSES.md` | Core, wildcard, and obvious-things attack prompts |
  22. | `MEMORY-SAFETY-AND-BINARY.md` | Memory-safety, binary, and kernel hunting classes for native targets |
  23. | `AI-AND-LLM.md` | Prompt-injection, agent/tool, and output-handling hunting classes for LLM-backed targets |
  24. | `WEB-PROTOCOL-AND-AUTH.md` | HTTP request-framing, cache, and authentication-protocol hunting classes for HTTP-protocol and auth targets |
  25. | `CLIENT-SIDE.md` | DOM-injection, messaging-trust, UI-redress, and prototype-pollution hunting classes for client-side/browser targets |
  26. | `SUPPLY-CHAIN-AND-RELEASE.md` | Dependency, CI, release, signing, update, plugin, and extension hunting classes |
  27. | `CLOUD-AND-DEPLOYMENT.md` | IAM, infrastructure-as-code, container, serverless, ingress, and runtime-configuration hunting classes |
  28. | `PROTOCOLS-RPC-AND-MESSAGING.md` | RPC, serialization, queue, broker, webhook, and streaming-protocol hunting classes |
  29. | `RESOURCE-EXHAUSTION-AND-AVAILABILITY.md` | Shared resource, quota, queue, worker, and operator-spend hunting classes |
  30. | `DATA-ISOLATION-AND-LIFECYCLE.md` | Tenant isolation, cache, search, export, backup, migration, deletion, and restore hunting classes |
  31. | `DESKTOP-MOBILE-AND-LOCAL-IPC.md` | Native app, deep-link, webview, exported-component, helper, daemon, and local-IPC hunting classes |
  32. | `VALIDATION-AND-REPORTING.md` | Phases 3–6 candidate validation, structured output, record verification, and reporting |
  33. | `report-schema.json` | JSON schema for all three `findings.json` verdicts |
  34. | `validate-findings.cjs` | Zero-dependency validator for `findings.json` in Phases 4 and 5 |
  35. | `validate-findings.test.cjs` | Findings-validator tests and producer-compatible fixture checks |
  36. | `validate-coverage-ledger.cjs` | Zero-dependency validator for `coverage-ledger.json` in Phases 1–5 |
  37. | `validate-coverage-ledger.test.cjs` | Coverage-ledger validator tests |
  38. ## Installation
  39. Install the skill with the [Skills CLI](https://skills.sh):
  40. ```bash
  41. npx skills add https://github.com/cloudflare/security-audit-skill \
  42. --skill security-audit
  43. ```
  44. Use `--global` for a user-level installation:
  45. ```bash
  46. npx skills add https://github.com/cloudflare/security-audit-skill \
  47. --skill security-audit \
  48. --global
  49. ```
  50. Run `npx skills --help` for agent-selection and non-interactive options.
  51. ## Usage
  52. Start your coding agent in (or pointed at) the codebase you want to audit, then ask it to do a security audit:
  53. ```
  54. security audit this codebase
  55. ```
  56. ```
  57. find security vulnerabilities in ./src
  58. ```
  59. ```
  60. do a security review, output to ~/audits/my-project
  61. ```
  62. The skill activates automatically when the request matches its trigger (security audit, find vulnerabilities, pen-test the code, etc.). A direct codebase audit or pen-test request uses full audit mode. Security questions and focused vulnerability work use guidance mode unless you request report artifacts. In full audit mode, an unspecified output directory defaults to `~/security-audit-skill/<repo-name>/run-<N>`. The workflow writes inside the target repository only when you explicitly select a directory that version control ignores.
  63. ## Requirements
  64. - A coding agent with a model that supports tool use and parallel sub-agents
  65. - Node.js for the zero-dependency findings and coverage-ledger validators
  66. - An OS-enforced sandbox for target-controlled builds, tests, processes, browsers, emulators, fuzzers, and fixtures. It must disable external networking, use a sanitized allowlisted environment, enforce resource limits, and allow writes only to assigned scratch paths. Without these controls, the workflow keeps the lead as `needs_validation` instead of executing target code.
  67. ## Design principles
  68. - **Only confirm established boundary failures.** Keep a source-grounded blocked lead as `needs_validation` with its exact unresolved fact.
  69. - **Adversarial validation.** The agent that checks a finding is never the agent that found it.
  70. - **Severity requires impact.** Likelihood x impact, not deviation from a checklist.
  71. - **Defense-in-depth gaps are not vulnerabilities.** If Layer A prevents the attack, the absence of Layer B is a hardening note.
  72. - **Multiple runs improve coverage.** In our test runs, a single run found roughly half of the vulnerabilities that repeated runs found in total.
  73. ## Contact
  74. Questions, feedback, or comparing notes on AI-driven security tooling: security-ai-research@cloudflare.com
  75. ## License
  76. MIT -- see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.