# I Built a Security Linter for AI-Generated Code, Here Is What I Found in a Real Production Codebase

> Source: <https://dev.to/david_seagal_77ff697cd0f6/i-built-a-security-linter-for-ai-generated-codehere-is-what-i-found-in-a-real-production-codebase-38hp>
> Published: 2026-08-30 13:11:36+00:00

AI coding tools write fast.

GitHub Copilot. Cursor. ChatGPT. Claude. Gemini.

Every single one of them is now inside production

codebases at companies worldwide.

And every single one of them produces the same

security vulnerabilities repeatedly.

Not because they are bad tools.

Because they were trained on code that had

security mistakes in it — and they learned

those patterns too.

A developer handed me their production codebase

to audit.

I ran my new tool on it.

Here is what came back:

533 files scanned.

3 critical security vulnerabilities.

All produced by AI coding tools.

All missed by their existing security pipeline.

All fixed with exact one-line commands.

The tool is called VibeGuard.

VibeGuard is a free open-source security linter

built specifically for AI-generated code.

Not a generic SAST tool. Not another Bandit wrapper.

Every rule was written by studying actual

AI-generated code and cataloguing the exact

vulnerability patterns these tools produce.

Here is what it catches:

→ SQL injection via f-strings

Copilot writes f"SELECT * FROM users WHERE id = {user_id}"

Looks clean. Works perfectly.

Also lets any attacker dump your entire database.

→ Hardcoded API keys and passwords

AI tools write secrets directly into source code

because that is what training examples looked like.

→ JWT without algorithm verification

ChatGPT generates jwt.decode(token, secret)

Missing the algorithms parameter.

Vulnerable to the alg:none bypass attack.

→ Command injection via shell=True

subprocess.run(cmd, shell=True) everywhere.

User input reaches the shell. Game over.

→ MD5 for password hashing

Still appearing in AI-generated auth code in 2026.

Crackable in seconds.

→ DEBUG=True shipped to production

Every AI tool sets this by default.

Exposes your entire stack to anyone who triggers an error.

Every finding includes the exact working code

to fix the problem.

Not a description.

Not a link to documentation.

The actual replacement code.

Copy. Paste. Fixed.

```
git clone https://github.com/zeroFhacker/vibeguard
cd vibeguard
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
PYTHONPATH=. python -m vibeguard.cli scan --path ./your-project
```

Works on Python, JavaScript and TypeScript.

Zero configuration.

Grades your code A to F.

Grade F. 3 critical findings.

In files I thought were secure.

That is the point.

AI tools are fast. They are powerful.

They will not slow down.

But they need a security layer between

what they generate and what ships to production.

VibeGuard is that layer.

MIT licensed. Zero cloud. Zero tracking.

Everything runs locally on your machine.

Contributions welcome — especially rules for

Go, Rust, Java and infrastructure as code.

🔗 github.com/zeroFhacker/vibeguard

Run it on your codebase before the next deployment.

It takes 30 seconds.

It is free.

It might save you from a very bad day.

*Built by David Seagal — security engineer and
open source builder at github.com/zeroFhacker*
