Find Code Vulnerabilities with Verified Evidence
Find security flaws in your code and verify the evidence before reporting them. Cloudflare’s security-audit coordinates independent agents to map attack surfaces, investigate candidates and produce findings with source references, validation status and suggested fixes.
Requirements
- Node.js >= 22.20 (skills CLI)
Overview
What you get
- An architecture map and a coverage ledger showing what was checked and what remains.
- Independent verification of candidate findings, with source evidence and suggested fixes.
- Structured findings.json records plus REPORT.md, FINDINGS-DETAIL.md and NEEDS-VALIDATION.md.
Good fit
- Auditing a repository or a focused module before prioritizing security fixes.
- Revisiting previous findings and coverage gaps after source changes.
Tutorial
Understand the findings and the audit’s coverage
When AI flags suspicious code, you need to know its impact, the supporting evidence and which conditions remain unverified. Cloudflare’s security-audit assigns independent agents to investigate and verify candidates, then produces reports with source evidence, verdicts and suggested fixes.
In this exercise, you will audit one module in your project, follow up on missing evidence and plan a second review.
How does it compare with other code review skills here?
- Emil’s design and engineering skills review UI motion, interactions and component implementation to improve the user experience.
- security-audit investigates boundaries such as authorization and data isolation. It verifies candidates and records checked areas and gaps. Choose it when you need to establish who can access whose data.
Which reports should you read first?
The full audit workflow produces these three documents:
| File | What to look for |
|---|---|
REPORT.md | Scope, confirmed findings, unresolved leads and coverage gaps |
FINDINGS-DETAIL.md | Source traces, reproduction evidence and suggested fixes for confirmed medium, high and critical findings |
NEEDS-VALIDATION.md | Missing facts and the next steps to resolve them |
Finding records use three verdicts:
confirmed: the source trace and observed result support the conclusion. The record includes severity and a suggested fix.needs_validation: source evidence supports a candidate, but a decisive fact is missing. The record gives the blocker and a validation plan, with no severity.rejected: evidence disproves the original claim. The rejection reason is retained to avoid reporting it again.
Read the scope before the findings. If there are no confirmed findings, use the unresolved leads and coverage gaps to choose the next task.
Install the skill and prepare your environment
Install it in the target project
- Prepare a local project and a coding agent that supports tool use and parallel sub-agents. The skills CLI installer requires Node.js 22.20 or later. The skill’s two report validators also use Node.js.
- Run the official installation command in a terminal at the project root:
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit
- Follow the installer’s prompts to select your coding agent, then open a session in the project. Ask the agent to read the installed
security-auditinstructions and locate its companion guides,report-schema.jsonand bothvalidate-*.cjsvalidators.
Keep the complete skill directory: later steps read the guides and validators alongside SKILL.md. Add --global to the command for a user-level installation.
Check the local validation environment
Source inspection is read-only. To run project tests or other target-controlled code, the agent needs an OS-enforced sandbox with:
- External networking disabled and an empty environment populated from an explicit allowlist.
- Read-only source and toolchain access, with writes restricted to assigned scratch space.
- CPU, memory, process, file-size, disk and time limits.
- Dummy identities and test data for minimal local checks.
The next request asks the agent to check these capabilities first. If a capability is missing, it should record the exact blocker and a concrete follow-up validation plan for the affected lead.
Run a first audit on one module
Define the scope and access rules
Start with a module you understand, such as an API that reads orders. Find its relative path and describe who is allowed to read which orders. This gives the agent a rule to check against the implementation.
- Note the module path and its related authentication and authorization entry points.
- Choose an unused output directory outside the repository, such as
~/audits/my-project/run-1. - Send the following request to your coding agent in the project. Replace the bracketed values.
This request, the follow-up request and the final template were written for this tutorial.
Use security-audit to run the full security audit workflow and produce reports.
Scope: [module-relative path and directly related authorization files].
Access rules: [for example: users can read only their own orders;
administrators can read all orders].
Use the quick profile and write to a new directory outside the repository:
[absolute output path].
First check the scope, source revision, sub-agent support and sandbox capabilities.
Complete the investigation, independent verification and both JSON validators
as required by the skill.
In REPORT.md, state what was checked, deferred and outside scope.
At the end, state whether the run completed, and summarize confirmed findings
and leads that need validation.
quick suits a first pass over a small scope. It runs one hunting wave and one final coverage review, with a fresh independent verifier handling each candidate’s validation. The default standard profile supports further hunting waves; deep splits the scope more finely and adds verification.
Check the first results
- Open
REPORT.mdin the output directory. Confirm that its scope and source revision match the task. - Read
run_statusinrun-metadata.json. If it isincomplete, read the reason and affected areas before narrowing the scope or supplying missing capabilities for a new run. - If there are finding records, pick one and follow its cited source, access rule and observed result.
- Read
coverage-ledger.jsonto see which checks finished and which were blocked or deferred. If there are no finding records, use this ledger to decide whether to investigate a gap or finish this round.
Ordinary security questions usually use guidance mode. Explicitly requesting the full audit workflow and report artifacts produces the files used in this exercise.
Follow the evidence and resolve validation gaps
For leads that need validation, supply the missing evidence. For confirmed findings, choose a fix. If neither type of record is present, continue to the next section to plan a later audit.
Supply one decisive fact
Choose a record in NEEDS-VALIDATION.md whose missing information you can provide. For example, the source may lead to an access check while the deployed policy is unknown. Read the blocker, then supply the relevant configuration or a specific observation from the project owner.
Find the record’s fingerprint in findings.json; this identifier tracks the same issue across runs. Insert it in the request below and send it to the agent. A new output directory keeps this review’s records separate.
Use security-audit to recheck [record fingerprint] from the previous run
and produce updated reports.
Previous results: [old output directory].
New evidence: [configuration path or a specific fact checked by the project owner].
Inspect the relevant current source and use this evidence to reassess
the record's blocker and validation plan.
If execution is needed, check the sandbox and use local test data
as required by the skill.
Write to a new directory outside the repository: [new output directory].
Explain whether the record is confirmed, still needs validation or is rejected,
and give the supporting evidence.
Check whether the missing fact has been resolved and what supports any verdict change. New information can support or disprove the original claim.
Choose a confirmed finding to fix
Read the suggested fix and regression-test approach for a confirmed finding. Once you choose it, give your coding agent a separate implementation task naming the record, target files and access rule the change must enforce.
The audit workflow inspects code and recommends changes. This separate task implements the fix you selected. After the change, audit the affected paths again using the next section.
Recheck fixes and plan the next audit
- Keep the old output directory. Note the changes to recheck or the gaps to investigate next.
- Give the next audit the previous results and the current scope.
- Choose another output directory outside the repository, then compare the evidence and verdicts across runs.
Fill in this template for another audit or project:
Use security-audit to run the full security audit workflow and produce reports.
Project: [absolute local repository path].
Scope: [module, paths or changes between two commits].
Security rules: [which identities may perform which actions on which resources].
Profile: [quick / standard / deep].
Previous results: [old output directory, or none for a first run].
New output directory: [unused directory outside the repository].
Check execution capabilities first, then inspect the current source
and independently verify candidates.
Prioritize: [selected records, changed paths or coverage gaps]. Also list this run's coverage gaps.
The agent uses previous results to plan the review and rechecks the relevant source. Use the new report to answer three questions: do the changed paths still have issues, have previous leads reached a verdict, and which areas still need attention?
The skill is MIT licensed. Installation and workflow references: the README, skill instructions and validation and reporting guide.