cloudflare/security-audit-skill: A coding-agent ability for multi-phase safety audits with independently verified, machine-readable findings · GitHub


A coding-agent ability that turns your agent right into a safety auditor. It orchestrates remoted brokers by means of reconnaissance, coverage-led searching, candidate validation, structured output, impartial report verification, and target-neutral reporting.

This is the ability that seeded Cloudflare’s vulnerability discovery harness, described in Build your own vulnerability harness. The harness grew right into a multi-stage, fleet-wide system; this ability is the single-repo start line it developed from.

The ability runs a structured audit in six phases:

  1. Reconnaissance — map structure, belief boundaries, enter surfaces, prior proof, and deterministic protection in structure.md and coverage-ledger.json.
  2. Coverage-led searching — assign remoted hunters from ledger models, report their checks, and use protection critics to search out gaps.
  3. Candidate validation — give each distinctive candidate to a recent verifier that tries to disprove it.
  4. Structured output — write confirmed, needs_validation, and rejected information to findings.json and validate them towards report-schema.json.
  5. Independent report verification — recent brokers confirm remaining supply claims. Material replacements obtain one other impartial verifier.
  6. Target-neutral reporting — derive REPORT.md, FINDINGS-DETAIL.md, and NEEDS-VALIDATION.md from the verified information and protection ledger.

The guardian runs validate-coverage-ledger.cjs after creating the ledger and after every later ledger replace. It runs validate-findings.cjs in Phase 4 and once more after each Phase 5 substitute.

The verdicts are distinct: confirmed has an entire supply hint and bounded noticed consequence, needs_validation has a precise unresolved reality and no severity, and rejected information a disproved candidate.

Multiple runs towards the identical repo are additive. The ability makes use of prior ledgers and findings to focus on gaps, revalidate modified supply, and carry ahead current-source proof with out treating stale or unresolved work as coated.

File Purpose
SKILL.md Setup, core ideas, platform terminology, workflow overview, and audit anti-patterns
RECONNAISSANCE.md Phase 1 reconnaissance prompts and synthesis directions
HUNTING.md Phase 2 orchestration, searching methodology, and validation guidelines
ATTACK-CLASSES.md Core, wildcard, and obvious-things assault prompts
MEMORY-SAFETY-AND-BINARY.md Memory-safety, binary, and kernel searching lessons for native targets
AI-AND-LLM.md Prompt-injection, agent/software, and output-handling searching lessons for LLM-backed targets
WEB-PROTOCOL-AND-AUTH.md HTTP request-framing, cache, and authentication-protocol searching lessons for HTTP-protocol and auth targets
CLIENT-SIDE.md DOM-injection, messaging-trust, UI-redress, and prototype-pollution searching lessons for client-side/browser targets
SUPPLY-CHAIN-AND-RELEASE.md Dependency, CI, launch, signing, replace, plugin, and extension searching lessons
CLOUD-AND-DEPLOYMENT.md IAM, infrastructure-as-code, container, serverless, ingress, and runtime-configuration searching lessons
PROTOCOLS-RPC-AND-MESSAGING.md RPC, serialization, queue, dealer, webhook, and streaming-protocol searching lessons
RESOURCE-EXHAUSTION-AND-AVAILABILITY.md Shared useful resource, quota, queue, employee, and operator-spend searching lessons
DATA-ISOLATION-AND-LIFECYCLE.md Tenant isolation, cache, search, export, backup, migration, deletion, and restore searching lessons
DESKTOP-MOBILE-AND-LOCAL-IPC.md Native app, deep-link, webview, exported-component, helper, daemon, and local-IPC searching lessons
VALIDATION-AND-REPORTING.md Phases 3–6 candidate validation, structured output, report 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.check.cjs Findings-validator assessments and producer-compatible fixture checks
validate-coverage-ledger.cjs Zero-dependency validator for coverage-ledger.json in Phases 1–5
validate-coverage-ledger.check.cjs Coverage-ledger validator assessments

Install the ability with the Skills CLI:

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

Use --global for a user-level set up:

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

Run npx abilities --help for agent-selection and non-interactive choices.

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

safety audit this codebase
discover safety vulnerabilities in ./src
do a safety evaluation, output to ~/audits/my-project

The ability prompts routinely when the request matches its set off (safety audit, discover vulnerabilities, pen-test the code, and so forth.). A direct codebase audit or pen-test request makes use of full audit mode. Security questions and centered vulnerability work use steerage mode except you request report artifacts. In full audit mode, an unspecified output listing defaults to ~/security-audit-skill//run-. The workflow writes contained in the goal repository solely once you explicitly choose a listing that model management ignores.

  • A coding agent with a mannequin that helps software use and parallel sub-agents
  • Node.js for the zero-dependency findings and coverage-ledger validators
  • An OS-enforced sandbox for target-controlled builds, assessments, processes, browsers, emulators, fuzzers, and fixtures. It should disable exterior networking, use a sanitized allowlisted setting, implement useful resource limits, and permit writes solely to assigned scratch paths. Without these controls, the workflow retains the lead as needs_validation as an alternative of executing goal code.
  • Only affirm established boundary failures. Keep a source-grounded blocked lead as needs_validation with its actual unresolved reality.
  • Adversarial validation. The agent that checks a discovering is rarely the agent that discovered it.
  • Severity requires influence. Likelihood x influence, not deviation from a guidelines.
  • Defense-in-depth gaps are usually not vulnerabilities. If Layer A prevents the assault, the absence of Layer B is a hardening notice.
  • Multiple runs enhance protection. In our check runs, a single run discovered roughly half of the vulnerabilities that repeated runs present in whole.

Questions, suggestions, or evaluating notes on AI-driven safety tooling: [email protected]

MIT — see LICENSE.



Source link