ailinter — AI Code Safety Visor v1.0
v1.0.0 · VS Code Extension · 269+ Secret Rules · 7 MCP Tools
ailinter shield mark

AI Code Safety Visor
v1.0 — Now with VS Code.

One 30 MB binary. 269+ secret rules · 58 vulnerability patterns · 20 quality detectors · 7 MCP tools. Zero dependencies.

AILINTER scans your code before AI touches it and validates AI-generated code before you commit it. Now with a VS Code extension — real-time quality scoring, delta tracking, and refactoring guidance right in your editor. Works with Claude, Cursor, OpenCode, Cline, Windsurf, and any MCP-compatible agent.

🔬 2.03× more patterns detected than Gitleaks
347 ms full scan · Zero false positives
🧩 VS Code Extension · Inline scores · Delta tracking
🎯 Our goal: prevent one million defects before 2027

Install in 30 Seconds

# macOS (Homebrew)
brew install ailinter/ailinter/ailinter

# VS Code Extension
code --install-extension ailinter.ailinter
Or search "ailinter" in VS Code Extensions panel

# Go install (latest stable)
go install github.com/ailinter/ailinter/cmd/ailinter@latest

# Scan your repo
ailinter check .

# Connect AI assistant (MCP)
ailinter mcp

No signup. No account. No telemetry required. MIT licensed.

Four Ways to Use AILINTER

From pre-flight quality checks to CI/CD gates — one binary covers the full AI development lifecycle.

🔍

Before AI Edits Your Code

AI calls analyze_code → gets quality score + smell report. If score < 80, AI refactors first. Your AI never touches dead code.

🛡️

After AI Generates Code

AI calls scan_for_secrets + vuln scan before commit. Catches hardcoded AWS keys, API tokens, SQLi, pickle deserialization.

⚙️

In CI/CD

Quality gate on every PR. Block merges with scores below threshold or hardcoded secrets. GitHub Actions + SARIF output included.

📊

Team Dashboards

VS Code Delta Dashboard tracks code health over time. See which files are improving, regressing, or need attention.

VS CODE EXTENSION · REAL-TIME SCANNING

Code Quality, Right in Your Editor

The AILINTER VS Code extension brings code quality scoring, secret detection, and vulnerability scanning into your editor — with inline annotations, delta tracking, and one-click refactoring guidance. No context switching. No CI wait times. Instant feedback on every save.

View full VS Code page →
AILINTER for VS Code
VS CODE EXTENSION

Code Quality, Right in Your Editor

Gutter icons, inline CodeLens, hover guidance, Quick Fix lightbulb, delta dashboard — everything you expect from a modern linter. 24 refactoring strategies with Go code examples at your fingertips.

View VS Code Extension →

On-Save Scanning

Auto-scans every file on save. Results appear instantly in Problems panel and status bar.

🔍

Inline Code Smells

Decorations highlight problem lines directly in the editor. Hover for details on each finding.

🔄

Refactoring Guidance

One-click refactoring strategies via webview panel. CodeLens + hover show actionable advice.

💡

Quick Fix Actions

Lightbulb suggestions: suppress warnings, replace secrets with env vars, open docs panel.

📋

CodeLens Scores

Function-level quality scores inline. Shows git merge-base delta: ▲ +6 or ▼ -3.

📈

Delta Dashboard

Track code health over time. See which files improved, regressed, or need attention — vs main branch.

Three Scanners. One Binary. Zero Dependencies.

Everything you need to keep AI-generated code safe and maintainable — in a single 30 MB Go binary.

Code Quality

20 detectors: deep nesting, brain methods, bumpy roads, complex conditionals, duplication, low cohesion, primitive obsession, global data, and more. Every file scored 0–100 with AI-friendly refactoring guidance.

Nesting Complexity Duplication Cohesion

Secrets Detection

269 betterleaks rules + 150 gitleaks fallback. AWS keys, Stripe tokens, GitHub PATs, private keys, JWT, Slack tokens, and more. All secrets redacted in MCP output — never leaked to AI context.

API Keys Tokens Private Keys Credentials

Vulnerability Scanning

58 patterns, 6 categories: injection, XSS, deserialization, weak crypto, XXE, and workflow attacks. Covers Python, Go, JS/TS, Java, C#, PHP. Line-level reporting with fix reminders.

SQLi XSS Injection Crypto

VS Code Extension

Real-time quality scoring, inline decorations, CodeLens annotations, hover refactoring guidance, Quick Fix actions, and a Delta Dashboard for code health tracking. On-save and on-edit scanning.

Status Bar CodeLens Delta Webview

MCP Integration

7 MCP tools for AI assistants: analyze_code, scan_for_secrets, assess_file, get_refactoring, and more. Works with Claude, Cursor, Cline, OpenCode, Windsurf, Continue.dev, Copilot.

Claude Cursor Cline OpenCode

CI/CD Integration

Quality gate on every PR. GitHub Actions workflow runs ailinter on every push. Block merges with low scores or secrets. SARIF output for GitHub Advanced Security integration.

GitHub Actions SARIF Pre-commit Gate

Code Quality: Before & After

See how AILINTER guides AI assistants to refactor deeply nested code into clean, maintainable functions — raising the quality score from 42 → 94.

BEFORE: Score 42/100 Deep nesting · Brain method
def process_order(data):
    if data:
        if "customer" in data:
            customer = data["customer"]
            if customer.get("active"):
                if "items" in data:
                    total = 0
                    for item in data["items"]:
                        if item.get("price"):
                            discount = 0
                            if item["price"] > 100:
                                discount = 0.1
                            if item["price"] > 500:
                                discount = 0.2
                            total += item["price"] * (1 - discount)
                    return {"status": "ok", "total": total}
        return {"status": "error"}
AFTER: Score 94/100 Guard clauses · Extracted
def process_order(data):
    if not data or "customer" not in data:
        return {"status": "error"}
    if not data["customer"].get("active"):
        return {"status": "error"}
    
    items = data.get("items", [])
    total = calc_total(items)
    return {"status": "ok", "total": total}
    
def calc_total(items):
    return sum(
        item["price"] * (1 - get_discount(item["price"]))
        for item in items if item.get("price")
    )
    
def get_discount(price):
    if price > 500: return 0.2
    if price > 100: return 0.1
    return 0
🟢 +52 points · 4 levels of nesting → 0 · Brain method (45 lines) → 3 focused functions (6-8 lines each) · 33% fewer lines of code
AI calls analyze_code → gets score 42 → calls get_refactoring_strategy("deep_nesting") → refactors in 3 steps → re-checks → score 94

Security Scanning in Action

AILINTER catches hardcoded secrets and vulnerabilities that AI assistants often introduce. 269 secret rules + 58 vulnerability patterns across 6 categories.

🔑 Secret Detection — 269+ Rules
# AI generated this config for you:
aws_config = {
    "region": "us-east-1",
    "access_key": "AKIAIOSFODNN7EXAMPLE"  ← SECRET!
}

# ailinter catches it instantly:
  [secret] aws_access_key_id (critical): line 4
  → Replaced with env var by Quick Fix action

# AI automatically fixes:
aws_config = {
    "region": "us-east-1",
    "access_key": os.getenv("AWS_ACCESS_KEY_ID")
}
AWS Key GitHub PAT Stripe Slack Token JWT Private Key
🛡️ Vulnerability Detection — 58 Patterns
# AI wrote this data loader for you:
def load_config(filepath):
    with open(filepath) as f:
        data = pickle.load(f)  ← CRITICAL!
        return data

# ailinter catches the vulnerability:
  [vuln] pickle_deserialization (critical): line 3
  → Arbitrary code execution risk
  [vuln] path_traversal (warning): line 2
  → Unsanitized file path

# AI receives refactoring guidance:
  → Use JSON or YAML instead of pickle
  → Validate filepath against allowlist
SQLi XSS Pickle Eval XXE CMD Injection
terminal — ailinter check . --format markdown
## app.py
Language: python | Lines: 45 | Score: 82/100 → Go Ahead

### Code Quality (1 issue)
deep_nesting (warning): Nesting depth 4 at line 32

### Vulnerability Scan (2 findings)
pickle_deserialization (critical): line 15 — can execute arbitrary code
eval_injection (critical): line 28 — use ast.literal_eval() instead

### Secret Scan
Clean — no secrets detected

Files: 12 | Go Ahead: 9 | Care: 2 | Needs Work: 1 | Stop: 0
Vulnerabilities: Clean (0 findings)

Why AILINTER?

Third-party benchmark — 11 controlled test fixtures, 3 clean repos (106 files), all tools at default settings.

🔬 2.03× more patterns than Gitleaks · 347 ms — fastest unified scan · 🎯 Zero false positives · 📦 30 MB — one binary, zero deps
MCP SERVER · STDIO TRANSPORT · 7 TOOLS

Runs Where Your AI Agent Runs

AILINTER is a native MCP server with 7 tools — AI coding assistants invoke it directly via stdio. No daemon, no API key, no cloud dependency. Everything is local, fast, and private.

analyze_code
scan_for_secrets
assess_file
get_refactoring
set_config
get_config
list_hotspots
// MCP Config — add to your AI tool's config file
{
 "mcpServers": {
 "ailinter": {
 "command": "ailinter",
 "args": ["mcp"]
 }
 }
}
Claude Code| Cursor| Cline| OpenCode| Windsurf| Continue.dev| Copilot

CI Integration

Block PRs with low quality scores or hardcoded secrets. Add to your GitHub Actions workflow — SARIF output integrates with GitHub Advanced Security.

# .github/workflows/ailinter.yml
name: AILINTER Quality Gate
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
 - uses: actions/checkout@v4
 - run: go install github.com/ailinter/ailinter/cmd/ailinter@latest
 - run: ailinter check . --format sarif > results.sarif
 - uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

The Refactoring Loop

The core workflow that prevents AI from making bad code worse.

1
Before editing: AI calls analyze_code → gets quality score
2
If score < 80: AI calls get_refactoring_strategy → refactors in 3-5 steps
3
After editing: AI re-runs analyze_code → confirms no regression
4
Before commit: AI calls scan_for_secrets → clean → commit

Code Quality Tiers

80–100Go Ahead — safe to modify freely
60–79Proceed with Care — small isolated changes
40–59Needs Work — refactor incrementally
0–39Stop & Refactor — fix before touching

Vulnerability Tiers

CleanNo vulnerabilities detected
MonitorWarning-level patterns — review
RemediateAlert/critical — fix before continuing
58
Vulnerability Patterns
269+
Secret Detection Rules
20+5
Quality + Metalinters
30 MB
Single Go Binary
1M Defect Prevention Goal — Making AI code safe at planetary scale