by tanviet12
Security scanning skill for Claude Code, Codex and Antigravity. Finds the 21 most common vulnerabilities in AI-written code and shows how to fix each one.
# Add to your Claude Code skills
git clone https://github.com/tanviet12/vbsecvbsec is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tanviet12. Security scanning skill for Claude Code, Codex and Antigravity. Finds the 21 most common vulnerabilities in AI-written code and shows how to fix each one. It has 341 GitHub stars.
vbsec's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/tanviet12/vbsec" and add it to your Claude Code skills directory (see the Installation section above).
vbsec is primarily written in Python. It is open-source under tanviet12 on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh vbsec against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
v1.2.0..HEAD before a releasevbsec-reports/ you can hand to whoever fixes it, with a JSON summary at the end for CI/CDThe code below works. Clicking through the app by hand, you'd never notice a problem. AI assistants write code like this all the time.
// src/lib/auth.ts
const payload = jwt.decode(token); // decodes only, does NOT verify the signature
(req as any).user = payload;
// src/routes/search.ts
const rows = await sequelize.query(
`SELECT id, name, price FROM products WHERE name LIKE '%${q}%'` // q comes from the URL
);
vbsec reports 2 CRITICAL issues:
| Issue | Impact | Fix vbsec suggests |
|---|---|---|
JWT-NONE-ALGORITHM |
Anyone can mint their own role: "admin" token without the secret key |
Use jwt.verify(token, secret, { algorithms: ["HS256"] }) |
SQL-INJECTION |
Typing ' UNION SELECT email, password_hash... into the search box dumps the whole user table |
Pass parameters with replacements: { q: `%${q}%` } instead of building the string |
Read the full sample report to see how vbsec explains each issue.
The repo ships sample apps with known, planted bugs. Each set also has traps that look like bugs but are safe, to measure false alarms.
saas-hard (MCP server, over-privileged agent, tenant leaks, permission checks that differ between paths, over-exposed responses), ledger-hard (money and state rules, concurrency, logs, sessions), misc-hard (zip bombs, PII in logs, open redirect), lessons-hard (one case per real-world security lesson). Each comes with a sample project rules file in tests/context/.| Latest run, 9 classic sets (v0.7) | |
|---|---|
| Bugs caught | 54/55 |
| False alarms on safe traps | 0 |
v0.8 results, measured 2026-11-16. Every column uses the same model, Claude Opus 5.5; the only difference is whether vbsec is used. One run per configuration.
1. Real code — a production multi-tenant SaaS codebase with an MCP server for an AI assistant, about 90 Go files. The answer key is 25 High / Medium issues found earlier by in-depth security reviews (several passes, with design docs); vbsec re-scanned the exact code that still had them.
| Opus, no skill | vbsec v0.7 | Opus + vbsec v0.8 (with --context) |
|
|---|---|---|---|
| High issues (5) | 0 | 0 | 5 |
| Medium issues (20) | 1 | 0 | 16.5 |
| Total (25) | 1 (4%) | 0 * | 21.5 (86%) |
* v0.7: two release-gate scans over the same period caught none of these High / Medium issues.
Without vbsec, the model read all the code and concluded "no serious issues"; it missed prompt injection through MCP, tools where the AI fills in its own confirmation, permissions leaking through a copy path, and writes into already-closed records. These are the classes vbsec v0.8 was built to catch.
2. Test sets in this repo (4 new SaaS sets, 61 planted bugs, each within 1–3 files):
| Set (planted bugs) | Opus, no skill | Opus + vbsec v0.7 | Opus + vbsec v0.8 |
|---|---|---|---|
| saas-hard (17) | 17 | 11 | 17 (16 with --context) |
| ledger-hard (13) | 12 | 7 | 12 |
| misc-hard (3) | 3 | 0 | 3 (with --context) |
| lessons-hard (28) | 15–18 | 10 | 19 |
| Total (61) | 47–50 | 28 | 51 |
The sets are small and each bug sits close to its cause, so a strong model with no skill finds many of them too; v0.8 still scores highest and nearly doubles v0.7. Beyond the count, vbsec gives a saved, standard report (severity, fix, JSON for CI) instead of a chat answer. The real gap shows on larger multi-layer code, as in part 1.
AI output can vary between runs. Re-run it yourself with ./scripts/run-fixtures.sh (see tests/README.md). vbsec has also been tried on OWASP Juice Shop and caught the vulnerability classes matching its documented challenges.
It reads code like a reviewer, not like grep. Many scanners flag every query( as "possible SQL injection", so they cry wolf constantly and people stop reading. vbsec reads the surrounding code, works out where the data comes from, and only then decides.
Take the same line of code:
db.query(`SELECT * FROM products WHERE name = '${x}'`)
x comes from a search box the user types into (req.query.q): flagged, because anyone can type malicious SQL there.x is a constant in the code or a value from a config file: not flagged, because outsiders can't change it.To tell these apart, vbsec sorts data into 4 trust levels, from "sent by a stranger" (forms, URLs, headers, uploads) to "produced by the system" (constants, environment variables). Only stranger-supplied data that reaches a dangerous call without being cleaned gets reported.
It knows each language and framework. On top of the general rules, vbsec has dedicated rules for Go, PHP, TypeScript/JavaScript, Python, .NET and Dart/Flutter, so it knows each library's traps. For example: Prisma.sql is safe but $queryRawUnsafe is not, bypassSecurityTrustHtml in Angular switches off XSS protection, Gin's debug mode left on in production, and a Flutter app keeping its login token in SharedPreferences instead of the Keychain.
Small repos scan instantly, big ones get split up. Under about 20 code files, vbsec scans directly in roughly 30–60 seconds. Larger repos are split into parts for up to 3 agents working in parallel, then the results are merged and de-duplicated.
One issue per line item. A line of code with 2 problems (say, reading another user's data and a race condition) shows up as 2 separate issues. Counts stay honest, and each one can be ticked off as it's fixed.
Reports in English or Vietnamese. Vietnamese is the default; add lang=en for English. The report ends with a fixed-format JSON block in English, so CI/CD can read it and block merges while critical issues remain.
The same rules on all three tools. Claude Code, Codex and Antigravity share one rule set and produce the same findings. The only difference: Claude Code runs in parallel, so it's faster on large repos.
You need one of: Claude Code, OpenAI Codex CLI, Google Antigravity.
git clone https://github.com/tanviet12/vbsec ~/vbsec
~/vbsec/scripts/install.sh
The script detects which of these tools you have and installs the skill for each. To update later: cd ~/vbsec && git pull.
Manual install, installing for one specific tool, troubleshooting: [docs/en/installation.md](docs/en/installati