AI Code Security: 5 Free Tools to Check Agent-Written Code
Five free open-source tools that check the code your AI coding agent writes. Setup, usage, and how to combine them into one security workflow.
Imagine a developer who builds a small product over a weekend with Claude Code: a signup form, payments, and a dashboard. On Sunday everything works, so he launches it and sends it to his friends. Two weeks later, someone discovers they can see other customers' invoices just by changing a number in the address.
In short: five free open-source tools now check the code that AI agents write. security-audit-skill from Cloudflare runs a full security audit. Open Code Review from Alibaba handles code review. Codex Security from OpenAI scans, verifies, and fixes vulnerabilities. Claude-BugHunter brings a bug hunter's approach. Plannotator adds human review of the plan before the agent writes code. The tools themselves are free, but most of them run a model that is billed by usage. This guide explains each tool and shows how to connect them into one workflow.
At a Glance: Who Does What
| Tool | Made by | What it does | When in the process | License |
|---|---|---|---|---|
| security-audit-skill | Cloudflare | Full security audit in six stages | Before launch and periodically | MIT |
| Open Code Review | Alibaba | Accurate code review on every change | On every PR | Apache 2.0 |
| Codex Security | OpenAI | Scanning, verifying, and fixing vulnerabilities | Weekly scan in CI | Apache 2.0 |
| Claude-BugHunter | elementalsouls | Bug hunter skills | Authorized offensive testing | MIT |
| Plannotator | backnotprop | Human comments on plans and code | Before the agent writes code | Apache 2.0 |
GitHub star counts as of November 15, 2026: security-audit-skill about 73 thousand, Open Code Review about 52 thousand, Codex Security about 13.6 thousand, Plannotator about 11.7 thousand, and Claude-BugHunter about 6 thousand. These numbers change quickly, so treat them as a rough order of magnitude.
Why Agent Code Needs a Second Check
That is the scenario anyone building with agents should think about. A coding agent is very good at making things work. It is much less good at asking what happens when someone tries to break them. Nobody wrote that bug on purpose. The agent was never asked the right question, and the human did not read the code.
The good news is that in recent months, open tools have been released that do exactly this, and most of them connect directly to the agent you already have.
1. security-audit-skill from Cloudflare
What It Is
This is a skill for coding agents that turns the agent into a security auditor. According to the README, it is the skill that grew into Cloudflare's internal vulnerability discovery system. It does not rely on a single scan. It runs several isolated agents that work through six stages:
- Reconnaissance: mapping the architecture, trust boundaries, and input points.
- Coverage-guided hunting: separate agents look for vulnerabilities by unit, and reviewers check what was missed.
- Candidate validation: each finding goes to a new agent that tries to disprove it.
- Structured output: findings are written to a file called findings.json and checked against a schema.
- Independent verification: new agents check the final claims again.
- Report: the output is REPORT.md, FINDINGS-DETAIL.md, and NEEDS-VALIDATION.md.
The key principle: the agent that checks a finding is never the agent that found it. This keeps the noise lower. Every finding gets one of three statuses: confirmed, needs_validation, or rejected.
Installation
npx skills add https://github.com/cloudflare/security-audit-skill \
--skill security-audit
To install at the user level, add the --global flag at the end.
Usage
Open your agent inside the project and write in plain language:
security audit this codebase
Or a more focused request:
find security vulnerabilities in ./src
By default, reports are saved outside the repo, in a folder called security-audit-skill under your home directory, with a subfolder for each repo and each run.
What to Know
- You need an agent with a model that supports tools and sub-agents that run in parallel, plus Node.js.
- To run the project's code, the skill requires a system-level sandbox with no external network access. Without it, the skill keeps the finding as needs_validation and does not run anything.
- According to Cloudflare, in their test runs, a single run found about half of the vulnerabilities that repeated runs found in total. It is worth running it more than once. The results accumulate.
- A full run with many sub-agents uses a lot of tokens. Start with one folder.
2. Open Code Review from Alibaba
What It Is
This is an AI code review command-line tool. According to Alibaba, it started as an internal tool that served tens of thousands of developers for two years before it was released as open source. The core idea is a hybrid approach. The parts that must not break, such as choosing files, grouping related files, and matching rules, are handled by deterministic code. The agent is only used where judgment is needed.
According to the benchmark they publish (200 real PRs from 50 repos in 10 programming languages), the tool achieves higher precision and F1 than a general-purpose agent like Claude Code using the same model, and it uses about one-ninth of the tokens. Note that its recall is lower. The authors chose fewer false alarms at the cost of coverage. This is the creators' own benchmark, not an independent test.
Installation
You need Git version 2.41 or higher.
npm install -g @alibaba-group/open-code-review
ocr config provider
ocr config model
Usage
cd your-project
ocr review # all local changes
ocr review --from main --to my-branch # range between branches
ocr review --commit abc123 # a single commit
ocr scan # scan whole files, not just the diff
ocr scan --path src/auth # one folder
The ocr scan command is useful when you receive code you do not know, or a project an agent built from scratch with no meaningful diff.
What to Know
- It has a Delegation mode. Your agent performs the review with its own model, and OCR only selects files and rules. In this mode, you do not need a separate API key.
- There are plugins for Claude Code, Codex, Cursor, Kimi Code, and OpenCode, and integrations with GitHub Actions, GitLab CI, and Gerrit.
- In normal mode, OCR uses the model provider you configured in it, not your Claude subscription.
3. Codex Security from OpenAI
What It Is
This is a TypeScript CLI and SDK that finds vulnerabilities, verifies them, generates fixes, and checks existing fixes. You can use it inside Codex, from the terminal, or in automation.
Installation
You need Node.js 22.13 or higher (or 24 or 26) and Python 3.10 or higher. On Python 3.10, you also need the tomli package.
npm install --global @openai/codex-security
cs login
Usage
cs scan . # standard scan
cs scan . --path src --path tests # only specific paths
cs scan . --diff origin/main # only what changed since main
cs scan . --mode deep # deep scan
cs policy . # draft SECURITY.md
At the end of a scan, you get a path to a Markdown report. From there, you can ask for a fix or ask to verify an existing fix.
Automatic Weekly Scan
The repo includes a ready-made GitHub Action. Add an OpenAI API key as a secret named CODEX_SECURITY_API_KEY, and copy the weekly workflow file from the examples folder. In the file, replace the placeholder line with the commit ID of an official release of the Action. After that, the scan runs on its own every week. The official example caps each scan at an estimated cost of $5 and reports findings without failing the job.
What to Know
- You can export to SARIF, JSON, and CSV, and open tasks in Linear, Jira, or GitHub.
- Scans work not only with OpenAI, but also with Amazon Bedrock, OpenRouter, and Fireworks AI.
- According to the README, some protected requests and findings require joining OpenAI's Trusted Access for Cyber program.
- Scans cost money based on model usage. There are flags to limit time and cost.
4. Claude-BugHunter
What It Is
This is a package of 83 skills and 15 commands for Claude Code. According to its creator, it was built from 681 patterns taken from published HackerOne reports. After installation, Claude Code approaches testing the way a bug hunter would: it includes a methodology, 58 skills for hunting vulnerabilities in web applications (XSS, SQLi, SSRF, IDOR, and more), skills for enterprise systems, and skills for writing reports and validation. Skills load automatically based on what you describe in plain language.
Installation
From inside Claude Code:
/plugin marketplace add elementalsouls/Claude-BugHunter
/plugin install claude-bughunter@elementalsouls
Or install by cloning:
git clone https://github.com/elementalsouls/Claude-BugHunter.git
cd Claude-BugHunter
bash scripts/install.sh
With the --all flag, the script also installs the skills for OpenCode, Codex CLI, Hermes Agent, and Google AntiGravity. The commands remain available only in Claude Code.
Important: Read This First
This is an offensive security tool. Use it only on your own systems or on targets you have explicit permission to test, such as a bug bounty program you are enrolled in or a practice environment like OWASP Juice Shop. Breaking into a system without permission is a criminal offense in many countries. If you own a product, the right use is to run it against your own test environment to see what an attacker would find.
One more thing to know: according to the README, Anthropic's safety mechanisms may refuse offensive requests even when the work is authorized. Professional penetration testers can apply to Anthropic's free Cyber Verification Program.
5. Plannotator
What It Is
Plannotator is a local browser-based review surface for coding agents. When the agent proposes a plan, a page opens. You mark comments on the plan or the diff, click submit, and the comments go back to the agent as its next message. It works with Claude Code, Codex, Copilot CLI, Gemini CLI, OpenCode, and more.
Why is this a security tool? Many vulnerabilities start at the planning stage. If the agent plans to store passwords without encryption or skip permission checks, it is much cheaper to catch that before a single line of code is written.
Installation
curl -fsSL https://plannotator.ai/install.sh | bash
Then, in Claude Code:
/plugin marketplace add backnotprop/plannotator
/plugin install plannotator@plannotator
Restart Claude Code.
Usage
/plannotator-review # review uncommitted changes
/plannotator-annotate src/ # annotate files in a folder
/plannotator-last # annotate the agent's last response
In plan mode, you do not need a command. Each time the agent creates a plan, the page opens automatically. In Codex, you replace the slash commands with !plannotator review or with skills that start with $plannotator.
What to Know
According to the README, the tool does not collect telemetry, and plans and comments stay local. It does check GitHub for a new version on each load, without sending any content. If you prefer not to run an install script directly from the internet, you can download it first, read it, and then run it.
How to Combine the Five Into One Workflow
Each tool sits at a different point on the path from idea to production. Here is how they fit together:
- Before writing code: Plannotator. The agent presents a plan, you mark what is missing around permissions, input, and data storage, and only then do you approve it.
- On every change: Open Code Review. Run
ocr reviewbefore each merge, or connect it to CI so every PR gets accurate line-level comments. - Once a week: Codex Security. The GitHub Action scans the whole repo, and you can open the findings as tasks in Linear, Jira, or GitHub.
- Before launch and once a quarter: security-audit-skill. A six-stage deep audit, ideally run more than once.
- External testing: Claude-BugHunter. Run it against your own test environment to see the product the way an attacker would.
Where to Start If You Have One Hour
- Building alone with Claude Code: install Plannotator and security-audit-skill. One keeps the plan in check, and the other checks the result.
- A team with PRs: start with Open Code Review in CI, and add a weekly Codex Security scan.
- A product already live with customers: start with a full security-audit-skill audit, then run an offensive test against your test environment.
Tip for Connecting the Tools
Both security-audit-skill and Codex Security produce structured findings (findings.json from Cloudflare, and SARIF, JSON, or CSV from Codex Security). You can ask your agent to read both files, merge the duplicates, and create one organized task list sorted by severity. Pass the fixes themselves through ocr review again before merging.
Limits and Caution
- None of these tools replaces a professional penetration test for a system that holds money or sensitive data. They reduce risk. They do not eliminate it.
- There are false positives and misses. Cloudflare itself notes that a single run finds only part of the vulnerabilities.
- Four of the tools that run a model send your code to the model provider you configured. Plannotator itself keeps everything local, but the agent you work with still sends code to its provider. Check that this is allowed under your company's or client's policy.
- Costs: multi-agent audits and deep scans use a lot of tokens. Limit paths and time during your first runs.
- The Open Code Review benchmark numbers come from the creators. I did not find an independent verification.
Sources
- cloudflare/security-audit-skill (https://github.com/cloudflare/security-audit-skill)
- alibaba/open-code-review (https://github.com/alibaba/open
Questions people ask
Which free tools check the security of code that an AI agent wrote?
The guide covers five open-source tools: security-audit-skill from Cloudflare for a full security audit, Open Code Review from Alibaba for code review, Codex Security from OpenAI for scanning, verifying, and fixing vulnerabilities, Claude-BugHunter for bug hunter style testing, and Plannotator for human comments on plans. Each one fits a different step of the process.
Are these tools really free?
The code for all five is open source, under the MIT or Apache 2.0 license. What costs money is the model that runs the check. Multi-agent audits, Codex Security scans, and standard Open Code Review runs use tokens based on usage, while Plannotator does not run a model itself.
What is the difference between security-audit-skill and Codex Security?
security-audit-skill is a skill for your coding agent that runs a six-stage deep audit with isolated agents, and each finding is checked by a different agent that tries to disprove it. Codex Security is an OpenAI CLI and SDK that scans the repo, verifies findings, generates fixes, and can run as a weekly scan in GitHub Actions.
Can I use Claude-BugHunter on any website?
No. It is an offensive tool, so use it only on your own systems or on targets you have explicit permission to test, such as a bug bounty program you are enrolled in or a practice environment like OWASP Juice Shop. Breaking into a system without permission is a criminal offense in many countries.
Do these tools replace a professional penetration test?
No. They reduce risk but do not eliminate it, and they can produce both false positives and misses. Cloudflare itself notes that a single run finds only part of the vulnerabilities. A system that holds money or sensitive data still needs a professional penetration test.
