security-audit-skill README

The project's README from github.com/cloudflare/security-audit-skill. As one markdown file: README.md.

security-audit

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.

This is the skill that seeded Cloudflare's vulnerability discovery harness, described in 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.

What it does

The skill runs a structured audit in six phases:

  1. Reconnaissance -- map architecture, trust boundaries, input surfaces, prior evidence, and deterministic coverage in architecture.md and coverage-ledger.json.
  2. Coverage-led hunting -- assign isolated hunters from ledger units, record their checks, and use coverage critics to find gaps.
  3. Candidate validation -- give every unique candidate to a fresh verifier that tries to disprove it.
  4. Structured output -- write confirmed, needs_validation, and rejected records to findings.json and validate them against report-schema.json.
  5. Independent record verification -- fresh agents verify final source claims. Material replacements receive another independent verifier.
  6. Target-neutral reporting -- derive REPORT.md, FINDINGS-DETAIL.md, and NEEDS-VALIDATION.md from the verified records and coverage ledger.

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.

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.

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.

Files

File Purpose
SKILL.md Setup, core principles, platform terminology, workflow overview, and audit anti-patterns
RECONNAISSANCE.md Phase 1 reconnaissance prompts and synthesis instructions
HUNTING.md Phase 2 orchestration, hunting methodology, and validation rules
ATTACK-CLASSES.md Core, wildcard, and obvious-things attack prompts
MEMORY-SAFETY-AND-BINARY.md Memory-safety, binary, and kernel hunting classes for native targets
AI-AND-LLM.md Prompt-injection, agent/tool, and output-handling hunting classes for LLM-backed targets
WEB-PROTOCOL-AND-AUTH.md HTTP request-framing, cache, and authentication-protocol hunting classes for HTTP-protocol and auth targets
CLIENT-SIDE.md DOM-injection, messaging-trust, UI-redress, and prototype-pollution hunting classes for client-side/browser targets
SUPPLY-CHAIN-AND-RELEASE.md Dependency, CI, release, signing, update, plugin, and extension hunting classes
CLOUD-AND-DEPLOYMENT.md IAM, infrastructure-as-code, container, serverless, ingress, and runtime-configuration hunting classes
PROTOCOLS-RPC-AND-MESSAGING.md RPC, serialization, queue, broker, webhook, and streaming-protocol hunting classes
RESOURCE-EXHAUSTION-AND-AVAILABILITY.md Shared resource, quota, queue, worker, and operator-spend hunting classes
DATA-ISOLATION-AND-LIFECYCLE.md Tenant isolation, cache, search, export, backup, migration, deletion, and restore hunting classes
DESKTOP-MOBILE-AND-LOCAL-IPC.md Native app, deep-link, webview, exported-component, helper, daemon, and local-IPC hunting classes
VALIDATION-AND-REPORTING.md Phases 3–6 candidate validation, structured output, record verification, and reporting
report-schema.json JSON schema for all three findings.json verdicts
validate-findings.cjs Zero-dependency validator for findings.json in Phases 4 and 5
validate-findings.test.cjs Findings-validator tests and producer-compatible fixture checks
validate-coverage-ledger.cjs Zero-dependency validator for coverage-ledger.json in Phases 1–5
validate-coverage-ledger.test.cjs Coverage-ledger validator tests

Installation

Install the skill with the Skills CLI:

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.

Usage

Start your coding agent in (or pointed at) the codebase you want to audit, then ask it to do a security audit:

security audit this codebase
find security vulnerabilities in ./src
do a security review, output to ~/audits/my-project

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.

Requirements

Design principles

Contact

Questions, feedback, or comparing notes on AI-driven security tooling: [email protected]

License

MIT -- see LICENSE.

security-audit-skill (cloudflare/security-audit-skill)

Searching Database…

Что это такое?Скилл для Cloudflare-агента-кодировщика, который превращает вашего агента в аудитора безопасности: он координирует изолированных агентов в рамках структурированного многоэтапного аудита и возвращает независимо проверенные результаты в машиночитаемом виде.
Это отдельное приложение, которое я запускаю, или что-то, что живёт внутри моего кодинг-агента?Это скилл, который загружает ваш уже установленный кодинг-агент, а не отдельное приложение. Запустите агента в целевой кодовой базе или укажите на неё и попросите провести аудит безопасности — скилл активируется автоматически, когда запрос совпадает с его триггером.
Как добавить его в мой кодинг-агент?Установите его через Skills CLI командой npx skills; флаг --global даёт установку на уровне пользователя, а npx skills --help показывает варианты выбора агента и неинтерактивный режим.
Что нужно в моём окружении, чтобы аудит корректно запустился?Кодинг-агент, чья модель поддерживает вызов инструментов и параллельных суб-агентов, Node.js для валидаторов без внешних зависимостей и песочница на уровне ОС для всего, что контролируется целевым кодом — сборок, тестов, браузеров, фаззеров.
Что будет, если я проигнорирую требование о песочнице?Рабочий процесс не будет выполнять целевой код: находки останутся в статусе needsvalidation, то есть вы получите более консервативный, непроверенный отчёт вместо выполнения недоверенного кода без песочницы.
Имеет ли значение, какая у меня ОС?Он работает везде, где работают ваш кодинг-агент и Node.js — macOS, Linux и Windows согласно тегам платформ в репозитории, хотя для аудита нативных целей дополнительно нужна песочница на уровне ОС.
Как выглядит реальный запуск аудита?Шесть фаз: разведка создаёт architecture.md и coverage-ledger.json, изолированные «охотники» прорабатывают единицы реестра, а «критики покрытия» ищут пробелы; каждый кандидат попадает к новому верификатору, который пытается его опровергнуть; подтверждённые записи попадают в findings.json; свежие агенты перепроверяют финальные утверждения; затем из проверенных записей генерируются REPORT.md, FINDINGS-DETAIL.md и NEEDS-VALIDATION.md.
Какие вердикты может получить находка?Три вердикта: confirmed требует полной трассировки по исходному коду и ограниченного наблюдаемого результата; needsvalidation отмечает точный нерешённый факт и не несёт уровня критичности; rejected означает, что верификатор опроверг кандидата. Агент, проверяющий находку, никогда не тот, кто её нашёл, а пробелы в эшелонированной защите записываются как замечания по укреплению защиты, а не как уязвимости.
Какие классы уязвимостей он покрывает?Поставляемые промпты для поиска покрывают безопасность памяти, проблемы бинарников и ядра; цели на базе AI/LLM, такие как prompt injection и злоупотребление инструментами агента; недостатки HTTP-протокола, кэша и аутентификации; DOM-инъекции на клиенте и prototype pollution; цепочку поставок и целостность релизов; облачные IAM и развёртывание; RPC, очереди и вебхуки; исчерпание ресурсов; изоляцию данных арендаторов; а также десктопные, мобильные и локальные IPC.
Одного запуска аудита достаточно?Запуски накапливают результат: в тестовых прогонах Cloudflare один проход находил примерно половину уязвимостей от общего числа, найденного повторными запусками. Последующие запуски используют предыдущие реестры и находки, чтобы прицельно закрывать пробелы и перепроверять изменённый код.
Creator
cloudflare
Size
0.1 MB
Stars
30.4K
Updated
CommitSep 14
Age
3mo
Commits · 90 Days