AI Code Guardian

Catch security vulnerabilities before you commit

cargo install ai-code-guardian
10+
Vulnerability Types
10x
Faster than Node.js
100%
Local & Private

Powerful Features

Lightning Fast

Written in Rust. Scans entire codebases in seconds. 10x faster than Node.js alternatives.

🎯

Interactive TUI

Navigate issues with arrow keys, mark false positives, and view detailed information in a beautiful terminal UI.

👀

Watch Mode

Auto-scan on file changes during development. Catch issues as you code.

🔧

Auto-Fix Suggestions

Every vulnerability includes actionable fix suggestions. Don't just find issues, solve them.

📊

Risk Scoring

Numerical risk scores (0-100) for every vulnerability. Prioritize what matters most.

🎨

Custom Rules

Define your own security patterns with .guardian.rules.json. Extend the scanner to your needs.

🔀

Git Integration

Scan only changed or staged files. Perfect for CI/CD pipelines and pre-commit hooks.

🚫

.guardianignore

Exclude files and patterns from scanning. Full control over what gets scanned.

🔒

100% Local

No data leaves your machine. Complete privacy. No API calls, no telemetry.

See It In Action

Basic Scan
Interactive Mode
Watch Mode
🛡️ AI Code Guardian - Security Scan Scanning: ./src ❌ HIGH (Risk: 85): Hardcoded API Key File: api.js:12 Code: const API_KEY = "sk-1234567890abcdef" Risk: API key found in source code. Store in environment variables instead. Fix: Use process.env.API_KEY or import from .env file ❌ HIGH (Risk: 85): SQL Injection Risk File: db.js:45 Code: query = "SELECT * FROM users WHERE id = " + userId Risk: String concatenation in SQL query. Use parameterized queries. Fix: Use parameterized queries: db.query('SELECT * FROM users WHERE id = ?', [userId]) ❌ MEDIUM (Risk: 50): Insecure HTTP Connection File: api.js:8 Code: fetch("http://api.example.com/data") Risk: Using HTTP instead of HTTPS. Data transmitted in plain text. Fix: Change to HTTPS: https://... Scan complete: 3 issues found (2 high, 1 medium, 0 low) Scanned 15 files
🛡️ AI Code Guardian - Interactive Mode ┌─ Issues ────────────────────────────────────────────────┐ │ HIGH - Hardcoded API Key - api.js:12 │ │ HIGH - SQL Injection Risk - db.js:45 │ │ MEDIUM - Insecure HTTP Connection - api.js:8 │ └─────────────────────────────────────────────────────────┘ ┌─ Details ───────────────────────────────────────────────┐ │ File: api.js:12 │ │ Code: const API_KEY = "sk-1234567890abcdef" │ │ Risk: API key found in source code │ │ Fix: Use process.env.API_KEY or import from .env │ └─────────────────────────────────────────────────────────┘ ↑/k: Up | ↓/j: Down | f: Mark False Positive | q: Quit
🛡️ AI Code Guardian - Watch Mode Watching: ./src Press Ctrl+C to stop Running initial scan... ✅ No security issues found! Scanned 15 files 👀 Watching for changes... 📝 File changed, rescanning... ❌ HIGH (Risk: 85): Hardcoded API Key File: api.js:12 Code: const API_KEY = "sk-1234567890abcdef" Fix: Use process.env.API_KEY or import from .env file 👀 Watching for changes...

Ready to Secure Your Code?

Install in seconds. Start scanning immediately.