@yagyeshvyas/vibeguard 0.1.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,600 +1,500 @@
1
- <div align="center">
2
-
3
- <!-- Animated Banner -->
4
- <img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&weight=600&size=28&pause=1000&color=2E75B6&center=true&vCenter=true&random=false&width=600&lines=VibeGuard;Security+%26+Privacy+for+AI-Coded+Apps;699+Rules+%7C+76+MCP+Tools;13+Defense+Layers;Zero+Telemetry+%7C+%240+Cost" alt="VibeGuard Animated Banner" />
5
-
6
- <br/>
7
-
8
- <!-- Badges -->
9
- ![GitHub stars](https://img.shields.io/github/stars/yagyeshVyas/VibeGuard?style=for-the-badge&color=2E75B6)
10
- ![GitHub forks](https://img.shields.io/github/forks/yagyeshVyas/VibeGuard?style=for-the-badge&color=2E75B6)
11
- ![GitHub license](https://img.shields.io/github/license/yagyeshVyas/VibeGuard?style=for-the-badge&color=22C55E)
12
- ![GitHub issues](https://img.shields.io/github/issues/yagyeshVyas/VibeGuard?style=for-the-badge&color=F59E0B)
13
- ![GitHub last commit](https://img.shields.io/github/last-commit/yagyeshVyas/VibeGuard?style=for-the-badge&color=2E75B6)
14
- ![npm](https://img.shields.io/badge/npm-vibeguard-blue?style=for-the-badge&color=CB3837)
15
- ![rules](https://img.shields.io/badge/rules-699-blue?style=for-the-badge&color=2E75B6)
16
- ![MCP tools](https://img.shields.io/badge/MCP%20tools-76-blue?style=for-the-badge&color=8B5CF6)
17
- ![cost](https://img.shields.io/badge/cost-%240-green?style=for-the-badge&color=22C55E)
18
- ![privacy](https://img.shields.io/badge/privacy-100%25%20local-green?style=for-the-badge&color=22C55E)
19
- ![telemetry](https://img.shields.io/badge/telemetry-NONE-green?style=for-the-badge&color=22C55E)
20
-
21
- <br/>
22
-
23
- <!-- Tagline -->
24
- <h3>The Security & Privacy Platform Built for Vibe Coders</h3>
25
-
26
- <p>AI coding tools (Claude Code, Cursor, Windsurf, Lovable, Bolt) ship fast — and often ship hardcoded secrets, open databases, injection holes, and privacy violations. <b>VibeGuard catches all of it.</b></p>
27
-
28
- <p><b>699 rules</b> · <b>76 MCP tools</b> · <b>58 CLI commands</b> · <b>13 defense layers</b> · <b>43 auto-fixes</b> · <b>12 AI clients</b> · <b>14 languages</b> · <b>20+ frameworks</b> · <b>$0 cost</b> · <b>zero telemetry</b></p>
29
-
30
- <br/>
31
-
32
- <!-- Install -->
33
- ## 📦 Install
34
-
35
- ### Option 1: From npm (when published)
36
- ```bash
37
- npx @yagyeshvyas/vibeguard install
38
- ```
39
-
40
- ### Option 2: From GitHub (works now!)
41
-
42
- ```bash
43
- git clone https://github.com/yagyeshVyas/VibeGuard.git
44
- cd VibeGuard
45
- npm install
46
- npm link # makes 'vibeguard' available globally
47
- ```
48
-
49
- Then use it:
50
- ```bash
51
- vibeguard scan # scan your project
52
- vibeguard dashboard # beautiful terminal dashboard
53
- vibeguard fix # auto-fix 43 rule types
54
- vibeguard pre-deploy # 13-gate deployment check
55
- vibeguard firewall "your prompt here" # AI firewall
56
- ```
57
-
58
- ### Wire into Claude Code (from GitHub clone)
59
-
60
- ```bash
61
- # In your project directory:
62
- echo '{ "mcpServers": { "vibeguard": { "command": "node", "args": ["/path/to/VibeGuard/bin/cli.js", "mcp"] } } }' > .mcp.json
63
- ```
64
-
65
- Or use the global Claude Code command:
66
- ```bash
67
- claude mcp add vibeguard -- node /path/to/VibeGuard/bin/cli.js mcp
68
- ```
69
-
70
- ### Wire into Cursor / Windsurf / other MCP clients
71
-
72
- Add to your MCP config file:
73
- ```json
74
- {
75
- "mcpServers": {
76
- "vibeguard": {
77
- "command": "node",
78
- "args": ["/path/to/VibeGuard/bin/cli.js", "mcp"]
79
- }
80
- }
81
- }
82
- ```
83
-
84
- ### Wire into Codex CLI
85
-
86
- ```bash
87
- # Add to ~/.codex/config.toml:
88
- [mcp_servers.vibeguard]
89
- command = "node"
90
- args = ["/path/to/VibeGuard/bin/cli.js", "mcp"]
91
- ```
92
-
93
- <p>Auto-detects 12 AI coding clients: <b>Claude Code, Cursor, Windsurf, Codex CLI, Antigravity, Gemini CLI, Continue, Cline, Roo Code, OpenHands, Aider, VS Code</b></p>
94
-
95
- <!-- AI Client Logos -->
96
- <table>
97
- <tr>
98
- <td align="center">🔵</td>
99
- <td align="center">🟣</td>
100
- <td align="center">🟢</td>
101
- <td align="center">🟡</td>
102
- <td align="center">🔴</td>
103
- <td align="center">🟠</td>
104
- <td align="center">⚫</td>
105
- </tr>
106
- <tr>
107
- <td align="center"><sub>Claude Code</sub></td>
108
- <td align="center"><sub>Cursor</sub></td>
109
- <td align="center"><sub>Windsurf</sub></td>
110
- <td align="center"><sub>Codex CLI</sub></td>
111
- <td align="center"><sub>Antigravity</sub></td>
112
- <td align="center"><sub>Gemini CLI</sub></td>
113
- <td align="center"><sub>Continue</sub></td>
114
- </tr>
115
- <tr>
116
- <td align="center"><sub>Cline</sub></td>
117
- <td align="center"><sub>Roo Code</sub></td>
118
- <td align="center"><sub>OpenHands</sub></td>
119
- <td align="center"><sub>Aider</sub></td>
120
- <td align="center"><sub>VS Code</sub></td>
121
- <td align="center"><sub>+ more</sub></td>
122
- <td align="center"></td>
123
- </tr>
124
- </table>
125
-
126
- <br/>
127
-
128
- ```bash
129
- vibeguard scan # scan your project
130
- vibeguard dashboard # beautiful terminal dashboard
131
- vibeguard fix # auto-fix 43 rule types
132
- vibeguard pre-deploy # 13-gate deployment check
133
- ```
134
-
135
- </div>
136
-
137
- ---
138
-
139
- <!-- Table of Contents -->
140
- <div align="center">
141
- <h2>📖 What is VibeGuard?</h2>
142
- </div>
143
-
144
- VibeGuard is a **free, zero-dependency security and privacy scanner** that runs entirely on your machine. It reads your code files locally, checks them against 699 security rules, and tells you exactly what's wrong and how to fix it — all without sending a single byte to any server.
145
-
146
- It's built specifically for the problems AI coding tools create:
147
- - Hardcoded API keys visible in browser dev tools
148
- - Supabase/Firebase databases open to the world (no RLS)
149
- - Admin endpoints with no authentication
150
- - SQL injection, command injection, XSS
151
- - Secrets committed to git history
152
- - Hallucinated npm packages that don't exist
153
- - User data sent to AI APIs without redaction
154
- - Analytics tracking without consent (GDPR violation)
155
- - WebRTC IP leaks, clipboard theft, geolocation without consent
156
-
157
- ---
158
-
159
- <div align="center">
160
- <h2>🛡️ 13-Layer Defense Architecture</h2>
161
- </div>
162
-
163
- Even if an AI is **fully jailbroken**, it cannot leak data. Each layer runs automatically when the MCP server starts.
164
-
165
- <table>
166
- <tr>
167
- <th>#</th>
168
- <th>Layer</th>
169
- <th>Module</th>
170
- <th>What It Catches</th>
171
- <th>When</th>
172
- </tr>
173
- <tr>
174
- <td align="center">1</td>
175
- <td><b>Static Scanner</b></td>
176
- <td><code>scanner.js</code></td>
177
- <td>699 security rules across 14 languages</td>
178
- <td>Before deploy</td>
179
- </tr>
180
- <tr>
181
- <td align="center">2</td>
182
- <td><b>AI Firewall</b></td>
183
- <td><code>firewall.js</code></td>
184
- <td>Prompt injection, jailbreaks, secret access</td>
185
- <td>Before LLM call</td>
186
- </tr>
187
- <tr>
188
- <td align="center">3</td>
189
- <td><b>Agent Guard</b></td>
190
- <td><code>firewall.js</code></td>
191
- <td>Dangerous file/command/network access</td>
192
- <td>Before agent action</td>
193
- </tr>
194
- <tr>
195
- <td align="center">4</td>
196
- <td><b>Runtime Interceptor</b></td>
197
- <td><code>interceptor.js</code></td>
198
- <td>Wraps fetch/http/exec/fs at runtime level</td>
199
- <td>During execution</td>
200
- </tr>
201
- <tr>
202
- <td align="center">5</td>
203
- <td><b>Output Guard</b></td>
204
- <td><code>interceptor.js</code></td>
205
- <td>Secrets/PII in AI responses → redacted</td>
206
- <td>After LLM response</td>
207
- </tr>
208
- <tr>
209
- <td align="center">6</td>
210
- <td><b>Exfil Firewall</b></td>
211
- <td><code>firewall.js</code></td>
212
- <td>PII/secrets in outbound data → blocked</td>
213
- <td>Before any request</td>
214
- </tr>
215
- <tr>
216
- <td align="center">7</td>
217
- <td><b>Env Lock</b></td>
218
- <td><code>interceptor.js</code></td>
219
- <td>Hides sensitive env vars from AI</td>
220
- <td>At process start</td>
221
- </tr>
222
- <tr>
223
- <td align="center">8</td>
224
- <td><b>Self-Protection</b></td>
225
- <td><code>interceptor.js</code></td>
226
- <td>Detects tampering with VibeGuard itself</td>
227
- <td>Continuous</td>
228
- </tr>
229
- <tr>
230
- <td align="center">9</td>
231
- <td><b>Zero-Trust Sandbox</b></td>
232
- <td><code>sandbox.js</code></td>
233
- <td>Locked VM: no fs, no exec, no network</td>
234
- <td>Code execution</td>
235
- </tr>
236
- <tr>
237
- <td align="center">10</td>
238
- <td><b>Behavioral Analysis</b></td>
239
- <td><code>behavior.js</code></td>
240
- <td>Trust building, data gathering, slow exfil</td>
241
- <td>Over session</td>
242
- </tr>
243
- <tr>
244
- <td align="center">11</td>
245
- <td><b>Supply Chain Firewall</b></td>
246
- <td><code>supply-firewall.js</code></td>
247
- <td>Malware, typosquats, dangerous scripts</td>
248
- <td>Before npm install</td>
249
- </tr>
250
- <tr>
251
- <td align="center">12</td>
252
- <td><b>Secret Vault</b></td>
253
- <td><code>vault.js</code></td>
254
- <td>AES-256-GCM encrypted in-memory storage</td>
255
- <td>Secret access</td>
256
- </tr>
257
- <tr>
258
- <td align="center">13</td>
259
- <td><b>Audit Trail</b></td>
260
- <td><code>audit-trail.js</code></td>
261
- <td>SHA-256 chained tamper-proof log</td>
262
- <td>All actions</td>
263
- </tr>
264
- </table>
265
-
266
- ---
267
-
268
- <div align="center">
269
- <h2>🔥 What VibeGuard Catches</h2>
270
- </div>
271
-
272
- <details>
273
- <summary><b>🔓 The #1 r/vibecoding Issue: Open Databases</b></summary>
274
-
275
- If you use Supabase, Firebase, or Convex, VibeGuard checks:
276
- - **RLS missing** — table created but row-level security never enabled
277
- - **RLS fake policy** — `USING (true)` — looks enabled in dashboard, protects nothing
278
- - **PERMISSIVE policy** — allows access unless another policy blocks it
279
- - **Service role key in client** — bypasses RLS entirely
280
- - **Firebase rules open** — `.read: true` or `.write: true`
281
- - **Firebase rules any-auth** — `auth != null` means ANY logged-in user sees ALL data
282
- - **Convex public query** — exported query with no auth check
283
- </details>
284
-
285
- <details>
286
- <summary><b>🔑 Secrets (50+ types)</b></summary>
287
-
288
- OpenAI, Anthropic, Stripe (live + restricted), AWS, GitHub, Slack, GitLab, Twilio, SendGrid, Mailgun, Telegram, npm, Resend, GCP, Azure, Cloudflare, Datadog, Sentry, Algolia, Vercel, Netlify, Heroku, DigitalOcean, Notion, Linear, Contentful, PlanetScale, Vault, Doppler, Grafana, Jira, PagerDuty, New Relic, Splunk, Braintree, Square, Paddle, MUX, Mailchimp, Postmark, Sendinblue, Twitch, Patreon, Discord, Bitbucket, JFrog, LaunchDarkly, Rollbar, Mapbox, Twilio SID, and more.
289
-
290
- Plus: connection strings with passwords, `.env` not in `.gitignore`, secrets in localStorage/sessionStorage, secrets in URL params, secrets in client-side config files.
291
- </details>
292
-
293
- <details>
294
- <summary><b>💉 Injection (30+ rules)</b></summary>
295
-
296
- - **SQL injection** — string concat, template literals, f-strings, format(), % formatting, raw queries across Prisma, Drizzle, Sequelize, TypeORM, Kysely, MikroORM, Turso, Hono, Go, Python, PHP, C#, Kotlin, Rust
297
- - **Command injection** — exec/spawn with user input, template literals, backtick interpolation
298
- - **Code injection** — eval, new Function, setTimeout/setInterval with strings, vm.runInContext
299
- - **XSS** — dangerouslySetInnerHTML, v-html, innerHTML, outerHTML, document.write, insertAdjacentHTML, Angular DomSanitizer bypass, Rails html_safe, Laravel `{!! !!}`
300
- - **SSTI** — template render with user input (EJS, Pug, Handlebars, Mustache)
301
- - **LDAP, XPath, NoSQL $where, header injection, log injection, CSV formula injection, PDF injection**
302
- - **SSRF** — fetch to internal IPs, cloud metadata service (169.254.169.254), DNS rebinding
303
- </details>
304
-
305
- <details>
306
- <summary><b>🔐 Auth (20+ rules)</b></summary>
307
-
308
- - JWT alg:none, weak JWT secret, JWT decoded without verify
309
- - Hardcoded admin credentials
310
- - Password compared with `==` (plaintext)
311
- - Session fixation (no regenerate after login)
312
- - No rate limiting on login/register
313
- - Password in query string
314
- - Missing MFA enforcement
315
- - OAuth state parameter empty/static
316
- - Token in URL
317
- - No logout endpoint
318
- </details>
319
-
320
- <details>
321
- <summary><b>🤖 AI/LLM Security (35+ rules)</b></summary>
322
-
323
- - Prompt injection in tool descriptions
324
- - AI agent can execute code, deploy, install packages, access secrets, modify auth
325
- - LLM output used as SQL, shell, DOM, file path
326
- - Data exfiltration via agent
327
- - Memory poisoning
328
- - Training data leakage
329
- - Agent loop without iteration cap
330
- - Tool result injection
331
- - Missing max_tokens, temperature too high
332
- - Browser API key exposure
333
- - **Secure prompt analysis** — analyzes your prompt BEFORE code generation
334
- </details>
335
-
336
- <details>
337
- <summary><b>📦 Supply Chain (15+ rules)</b></summary>
338
-
339
- - **Slopsquat detection** — hallucinated npm packages that don't exist
340
- - Typosquat detection
341
- - Postinstall scripts with curl/wget/eval
342
- - Unpinned Docker images (:latest)
343
- - GPL/AGPL license risk
344
- - Missing integrity hashes
345
- - git+http dependencies
346
- - Crypto miners in dependencies
347
- - Missing .npmrc
348
- </details>
349
-
350
- <details>
351
- <summary><b>🏗️ Infrastructure (40+ rules)</b></summary>
352
-
353
- - **Terraform**: S3 public, IAM wildcard, SG 0.0.0.0/0, RDS public, no encryption, no KMS rotation, hardcoded keys, no backup, no CloudTrail
354
- - **Kubernetes**: run-as-root, no readOnly FS, hostPath, hostPID/IPC, no NetworkPolicy, privileged, SYS_ADMIN, no seccomp, no probes, no security context
355
- - **Docker**: no USER directive, no HEALTHCHECK, privileged, no resource limits, secrets in env, :latest
356
- - **Docker Compose**: no resource limits, secrets in environment, privileged, host network, weak restart policy
357
- - **GitHub Actions**: script injection, write-all permissions, unpinned actions
358
- - **CI/CD**: GitLab secrets in YAML, Jenkins credentials, CircleCI context, AWS CDK secrets, CloudFormation, Helm, Ansible, Pulumi
359
- </details>
360
-
361
- <details>
362
- <summary><b>🔒 Privacy Protection (50+ rules)</b></summary>
363
-
364
- VibeGuard is the only scanner that protects user **privacy**, not just security:
365
- - WebRTC IP leak, clipboard reads, geolocation, camera/microphone
366
- - Canvas fingerprinting, device fingerprinting, Bluetooth scanning
367
- - Analytics without consent (Google Analytics, Mixpanel, Segment, PostHog, Amplitude, Facebook Pixel, Hotjar, FullStory)
368
- - Cookies without banner (ePrivacy/GDPR)
369
- - Sentry with PII, PII in logs, health data access, biometric data
370
- - Background location, contacts/photos/SMS/call log access
371
- - EXIF location leak, keystroke listeners, SRI missing
372
- </details>
373
-
374
- ---
375
-
376
- <div align="center">
377
- <h2>⚡ Privacy Commands</h2>
378
- </div>
379
-
380
- ```bash
381
- vibeguard privacy-audit # inventory all PII collection, storage, transmission
382
- vibeguard net-audit # map every outbound HTTP call (where does data go?)
383
- vibeguard ai-guard # detect user data sent to AI APIs without redaction
384
- vibeguard privacy-policy # auto-generate a privacy policy from code analysis
385
- vibeguard csp-generate # auto-generate Content-Security-Policy from code
386
- vibeguard firewall <prompt> # AI firewall — inspect prompt before sending to LLM
387
- vibeguard agent-guard # show blocked paths, commands, domains
388
- vibeguard exfil-check <data> # check data for PII/secrets before sending externally
389
- vibeguard dep-firewall <pkg> # check package name before npm install
390
- vibeguard sandbox <code> # execute code in zero-trust sandbox
391
- vibeguard output-guard <text> # sanitize AI response for secrets/PII
392
- vibeguard env-lock # lock environment variables — hide secrets from AI
393
- vibeguard self-check # verify VibeGuard hasn't been tampered with
394
- vibeguard pre-deploy # run all 13 security gates before deployment
395
- ```
396
-
397
- ### PII Detection & Redaction
398
-
399
- ```js
400
- const { detectPII, redactText } = require('vibeguard/pii');
401
-
402
- const text = 'Contact john@example.com or 555-123-4567. Card: 4242424242424242';
403
- const detected = detectPII(text); // [{ type: 'email', ... }, { type: 'credit-card', ... }]
404
- const safe = redactText(text); // 'Contact [REDACTED_EMAIL] or [REDACTED_PHONE]. Card: ****4242'
405
- ```
406
-
407
- Detected types: email, phone, SSN, credit card (Luhn-validated), AWS keys, JWTs, private keys, IP addresses, IBANs, MAC addresses.
408
-
409
- ---
410
-
411
- <div align="center">
412
- <h2>🚀 Pre-Deploy Gate (13 Gates)</h2>
413
- </div>
414
-
415
- Run all 13 security gates before deployment. If ANY gate fails, deployment is blocked.
416
-
417
- ```bash
418
- vibeguard pre-deploy # run all gates
419
- vibeguard pre-deploy --strict # fail on warnings too
420
- vibeguard pre-deploy --json # JSON output for CI/CD
421
- ```
422
-
423
- | # | Gate | What It Checks |
424
- |---|------|------|
425
- | 1 | Static Scan | 699 rules — any critical? |
426
- | 2 | Secret Scan | Secrets exposed in code? |
427
- | 3 | Git History | .env tracked in git? |
428
- | 4 | Dependency Audit | Slopsquat/typosquat? |
429
- | 5 | Supply Chain | Lockfile, scripts, licenses? |
430
- | 6 | Privacy Audit | PII collection/storage/transmission? |
431
- | 7 | Network Audit | Suspicious outbound domains? |
432
- | 8 | AI Data Guard | User data to AI APIs without redaction? |
433
- | 9 | Compliance | SOC2/PCI/HIPAA/GDPR? |
434
- | 10 | Config Check | .env in .gitignore? MCP installed? |
435
- | 11 | Self-Check | All VibeGuard modules intact? |
436
- | 12 | Tamper Check | No tampering with VibeGuard? |
437
- | 13 | Behavioral Check | No suspicious patterns? |
438
-
439
- ---
440
-
441
- <div align="center">
442
- <h2>📊 Numbers</h2>
443
- </div>
444
-
445
- <table>
446
- <tr><th>Metric</th><th>Value</th><th></th></tr>
447
- <tr><td>Rules</td><td><b>699</b></td><td>🔒</td></tr>
448
- <tr><td>MCP tools</td><td><b>76</b></td><td>🤖</td></tr>
449
- <tr><td>CLI commands</td><td><b>58</b></td><td>💻</td></tr>
450
- <tr><td>Auto-fixable rules</td><td><b>43</b></td><td>🔧</td></tr>
451
- <tr><td>Defense layers</td><td><b>13</b></td><td>🛡️</td></tr>
452
- <tr><td>Pre-deploy gates</td><td><b>13</b></td><td>🚀</td></tr>
453
- <tr><td>AI clients</td><td><b>12</b></td><td>🧠</td></tr>
454
- <tr><td>Languages</td><td><b>14</b></td><td>🌐</td></tr>
455
- <tr><td>Frameworks</td><td><b>20+</b></td><td>⚡</td></tr>
456
- <tr><td>Presets</td><td><b>12</b></td><td>⚙️</td></tr>
457
- <tr><td>Privacy rules</td><td><b>50+</b></td><td>🔒</td></tr>
458
- <tr><td>Firewall rules</td><td><b>30+</b></td><td>🔥</td></tr>
459
- <tr><td>AI Firewall threats</td><td><b>20+</b></td><td>🧱</td></tr>
460
- <tr><td>PII types detected</td><td><b>10+</b></td><td>👁️</td></tr>
461
- <tr><td>Source modules</td><td><b>43</b></td><td>📦</td></tr>
462
- <tr><td>Tests</td><td><b>236</b></td><td>✅</td></tr>
463
- <tr><td>Lint errors</td><td><b>0</b></td><td>✨</td></tr>
464
- <tr><td>Dependencies</td><td><b>1</b> (MCP SDK)</td><td>📦</td></tr>
465
- <tr><td>Cost</td><td><b>$0</b></td><td>💚</td></tr>
466
- <tr><td>Telemetry</td><td><b>None</b></td><td>🔒</td></tr>
467
- <tr><td>Data sent to servers</td><td><b>None</b></td><td>🔒</td></tr>
468
- </table>
469
-
470
- ---
471
-
472
- <div align="center">
473
- <h2>🔒 Privacy Guarantee</h2>
474
- </div>
475
-
476
- **VibeGuard never sends your code, secrets, API keys, or personal information anywhere.**
477
-
478
- | What | Network? | When |
479
- |------|----------|------|
480
- | `vibeguard scan` | **Never** | Local file read + regex match |
481
- | `vibeguard fix` | **Never** | Local file edit |
482
- | `vibeguard install` | **Never** | Local config write |
483
- | `vibeguard mcp` | **Never** | stdio transport only |
484
- | `vibeguard cve` | Opt-in | Package name → OSV.dev (free API) |
485
- | `vibeguard url` | Opt-in | URL you type → fetch headers |
486
- | `--verify-keys` | Opt-in | Key → provider that owns it |
487
-
488
- **No telemetry. No analytics. No tracking. No data collection. No uploads.**
489
-
490
- ---
491
-
492
- <div align="center">
493
- <h2>⚙️ Presets</h2>
494
- </div>
495
-
496
- ```bash
497
- vibeguard preset nextjs # Next.js + React
498
- vibeguard preset django # Django + Python
499
- vibeguard preset rails # Ruby on Rails
500
- vibeguard preset spring # Spring Boot + Java
501
- vibeguard preset aws # AWS / Terraform
502
- vibeguard preset gcp # Google Cloud
503
- vibeguard preset azure # Azure
504
- vibeguard preset api # REST / GraphQL API
505
- vibeguard preset mobile # React Native / mobile
506
- vibeguard preset fullstack # all rules (maximum coverage)
507
- ```
508
-
509
- ---
510
-
511
- <div align="center">
512
- <h2>🔧 CI/CD</h2>
513
- </div>
514
-
515
- ```bash
516
- vibeguard init-ci # GitHub Actions (SARIF + fail on CRITICAL)
517
- vibeguard install-hook # git pre-commit hook (blocks on critical)
518
- vibeguard install-hook-post # PostToolUse hook (auto-scan after AI edits)
519
- vibeguard pr-comment # GitHub PR comment format (markdown)
520
- ```
521
-
522
- Templates included for: **GitLab CI**, **Jenkins**, **CircleCI**, **Azure Pipelines**.
523
-
524
- ---
525
-
526
- <div align="center">
527
- <h2>💻 Languages & Frameworks</h2>
528
- </div>
529
-
530
- **Languages (14):** JavaScript, TypeScript, Python, Go, Java, Ruby, PHP, C#, Rust, Kotlin, Swift, Bash, SQL, YAML
531
-
532
- **Frameworks (20+):** Next.js, React, Remix, Astro, SolidStart, SvelteKit, Nuxt, Django, Flask, Rails, Laravel, Spring Boot, NestJS, Fastify, Express, Hono, tRPC, Gin, Echo, Drizzle, Prisma, Sequelize, TypeORM, Kysely, MikroORM, Convex, Turso, Clerk, Auth.js, Supabase, Firebase, Stripe, Polar, LemonSqueezy, Resend, Upstash, Pinecone, PostHog, Uploadthing
533
-
534
- **Compliance:** SOC 2, PCI-DSS, HIPAA, GDPR, ISO 27001, EU AI Act
535
-
536
- ---
537
-
538
- <div align="center">
539
- <h2>🛠️ Development</h2>
540
- </div>
541
-
542
- ```bash
543
- npm install
544
- npm test # 236 tests
545
- npm run lint # 0 errors
546
- npm run coverage # coverage report
547
- ```
548
-
549
- ---
550
-
551
- <div align="center">
552
- <h2>📖 Honest Scope</h2>
553
- </div>
554
-
555
- VibeGuard catches the **mechanical** security holes that AI tools leave behind. It does NOT:
556
- - Prove your app is safe or leak-proof
557
- - Track personal data end-to-end through your app automatically
558
- - Judge business logic flaws
559
- - Replace a real security review for anything touching money, auth, or personal data
560
-
561
- It **raises the floor fast** — catching the holes that AI tools create by default.
562
-
563
- ---
564
-
565
- <div align="center">
566
- <h2>📄 License</h2>
567
-
568
- MIT — Free forever. No ads. No tracking. No data collection.
569
-
570
- </div>
571
-
572
- ---
573
-
574
- <div align="center">
575
-
576
- <!-- Author Section -->
577
- <img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&weight=600&size=22&pause=1000&color=2E75B6&center=true&vCenter=true&random=false&width=400&lines=Made+with+%E2%9D%A4%EF%B8%8F+by;Yagyesh+Vyas" alt="Made by Yagyesh Vyas" />
578
-
579
- <br/>
580
-
581
- <a href="https://www.linkedin.com/in/yagyeshvyas/">
582
- <img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn" />
583
- </a>
584
- <a href="https://github.com/yagyeshVyas">
585
- <img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" alt="GitHub" />
586
- </a>
587
-
588
- <br/>
589
- <br/>
590
-
591
- <p><b>⭐ If VibeGuard helped you, star the repo!</b></p>
592
-
593
- <p>Found a bug? <a href="https://github.com/yagyeshVyas/VibeGuard/issues">Open an issue</a></p>
594
- <p>Want to contribute? <a href="https://github.com/yagyeshVyas/VibeGuard/pulls">Submit a PR</a></p>
595
-
596
- <br/>
597
-
598
- <p><sub>VibeGuard v0.1.0 · MIT License · 699 rules · 76 MCP tools · 13 defense layers · $0 cost · zero telemetry</sub></p>
599
-
1
+ <div align="center">
2
+
3
+ <!-- Animated logo / banner -->
4
+ <img src="website/banner.svg" alt="VibeGuard" width="480" />
5
+
6
+ ### Scan your AI-generated app for leaked keys, open databases, and injection holes in 5 seconds. 100% offline, free forever.
7
+
8
+ <!-- Badges -->
9
+ <p>
10
+ <a href="https://www.npmjs.com/package/@yagyeshvyas/vibeguard"><img src="https://img.shields.io/npm/v/@yagyeshvyas/vibeguard?style=flat-square&logo=npm&logoColor=white" alt="npm version" /></a>
11
+ <a href="https://github.com/yagyeshVyas/VibeGuard/actions"><img src="https://img.shields.io/github/actions/workflow/status/yagyeshVyas/VibeGuard/ci.yml?style=flat-square&logo=github&logoColor=white" alt="CI" /></a>
12
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT license" /></a>
13
+ </p>
14
+
15
+ <!-- Demo GIF -->
16
+ <img src="website/demo.gif" alt="VibeGuard scan demo" width="640" />
17
+
18
+ <br/>
19
+ <sub>Captured against a test project with a planted <code>sk_live</code> Stripe key.</sub>
20
+
21
+ ---
22
+
23
+ <!-- Quick install command -->
24
+ <a href="https://www.npmjs.com/package/@yagyeshvyas/vibeguard"><code>npx @yagyeshvyas/vibeguard scan</code></a>
25
+
26
+ [Features](#what-it-catches) &bull; [Quick Start](#quick-start) &bull; [Benchmark](#benchmark) &bull; [Commands](#commands) &bull; [Website](https://vibe-guard-site-ivory.vercel.app/) &bull; [Docs](https://github.com/yagyeshVyas/VibeGuard/wiki)
27
+
28
+ </div>
29
+
30
+ <!-- Anchor target for the badge link -->
31
+ <a id="license"></a>
32
+
33
+ ---
34
+
35
+ ```
36
+ $ npx @yagyeshvyas/vibeguard scan
37
+
38
+ VibeGuard security scan
39
+ ./my-app
40
+
41
+ CRITICAL api/route.ts:3 [secret.openai-key]
42
+ OpenAI API key hardcoded in server code
43
+ fix: Move to environment variable.
44
+
45
+ HIGH db/query.ts:5 [taint.sql-injection]
46
+ User input flows into SQL query via template literal (dataflow-confirmed)
47
+ fix: Use parameterized queries / prepared statements.
48
+
49
+ HIGH app/page.jsx:8 [taint.xss-dom]
50
+ User input from URLSearchParams reaches innerHTML — DOM XSS
51
+ fix: Use textContent instead of innerHTML. Sanitize with DOMPurify if needed.
52
+
53
+ Grade D (12 files) 1 critical 3 high 2 medium 1 low
54
+
55
+ Run vibeguard fix to auto-fix 4 issues
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Quick Start
61
+
62
+ ```bash
63
+ npx @yagyeshvyas/vibeguard scan
64
+ ```
65
+
66
+ Or one-command full protection (daemon + hooks + shell guard):
67
+
68
+ ```bash
69
+ npx @yagyeshvyas/vibeguard auto # full protection on
70
+ npx @yagyeshvyas/vibeguard auto --stop # turn it off
71
+ ```
72
+
73
+ ### Wire into Claude Code
74
+
75
+ ```bash
76
+ claude mcp add vibeguard -- npx @yagyeshvyas/vibeguard mcp
77
+ ```
78
+
79
+ ### Wire into Cursor / Windsurf
80
+
81
+ Add to your MCP config:
82
+ ```json
83
+ { "mcpServers": { "vibeguard": { "command": "npx", "args": ["@yagyeshvyas/vibeguard", "mcp"] } } }
84
+ ```
85
+
86
+ ---
87
+
88
+ ## What It Catches
89
+
90
+ **Leaked Stripe key in client code**
91
+ ```js
92
+ const key = "sk_live_51H8x..."; // anyone with devtools can issue refunds
93
+ ```
94
+ VibeGuard flags 50+ secret types — OpenAI, AWS, GitHub, Stripe, Slack, Firebase — and tells you to move them to `process.env`.
95
+
96
+ **Supabase database open to the world**
97
+ ```sql
98
+ create table posts ( ... ); -- no RLS — anyone can read/write all rows
99
+ ```
100
+ Detects missing RLS, fake RLS policies (`USING (true)`), and service-role keys in client components.
101
+
102
+ **SQL injection via template literal**
103
+ ```js
104
+ db.query(`SELECT * FROM users WHERE id = ${req.body.id}`);
105
+ ```
106
+ AST taint analysis traces `req.body.id` through template literals to `query()` — confirmed dataflow, not a regex guess.
107
+
108
+ **Prompt injection in system prompt**
109
+ ```js
110
+ { role: "system", content: "You are " + req.body.prompt }
111
+ ```
112
+ Catches user input injected into the system role — the root cause of most prompt injection attacks.
113
+
114
+ **`dangerouslySetInnerHTML` with request data**
115
+ ```jsx
116
+ <div dangerouslySetInnerHTML={{__html: req.body.html}} />
117
+ ```
118
+ Flags XSS sinks across React, Vue (`v-html`), Angular (`innerHTML`), and raw `innerHTML` / `outerHTML` / `insertAdjacentHTML`.
119
+
120
+ **AI agent loop without iteration cap**
121
+ ```js
122
+ while (true) { await agent.step(); }
123
+ ```
124
+ Detects uncapped agent loops — infinite API spend, resource exhaustion.
125
+
126
+ **Hardcoded JWT secret**
127
+ ```js
128
+ jwt.sign(payload, "mysecret123"); // token forgery
129
+ ```
130
+ Catches hardcoded session secrets, JWT keys, and credentials in config files, Dockerfiles, and Kubernetes secrets.
131
+
132
+ **Shell command from LLM output**
133
+ ```js
134
+ const completion = await openai.chat.completions.create({...});
135
+ exec(completion.choices[0].message.content); // RCE via prompt injection
136
+ ```
137
+ Only scanner that detects LLM output reaching `exec`, `eval`, SQL queries, and DOM sinks.
138
+
139
+ ---
140
+
141
+ ## `vibeguard auto` — One Command Full Protection
142
+
143
+ ```bash
144
+ vibeguard auto # activates everything
145
+ vibeguard auto --status # see what's active
146
+ vibeguard auto --stop # reverse everything, restore backups
147
+ ```
148
+
149
+ | Layer | What it does |
150
+ |-------|-------------|
151
+ | Daemon | Watches files, auto-scans on every change (300ms debounce) |
152
+ | Pre-commit hook | Blocks git commits on critical findings |
153
+ | Post-edit hook | Auto-scans files after AI agent edits them |
154
+ | Shell guard | Blocks dangerous commands (`rm -rf`, `sudo`, `curl\|sh`) before execution |
155
+
156
+ All state in `.vibeguard/auto.json`. Idempotent — safe to run twice. `--stop` restores everything byte-for-byte.
157
+
158
+ Flags: `--ci` (pipeline mode, exit non-zero on critical), `--fix` (apply safe auto-fixes), `--no-shell`, `--strict`.
159
+
160
+ ---
161
+
162
+ ## Confidence + Inline Suppression
163
+
164
+ Every finding has a confidence level:
165
+
166
+ | Confidence | Meaning |
167
+ |------------|---------|
168
+ | `high` | Dataflow-confirmed — input traced to sink via AST |
169
+ | `medium` | Multi-signal regex with validation logic |
170
+ | `low` | Bare regex match — heuristic hint |
171
+
172
+ ```bash
173
+ vibeguard scan --min-confidence medium # hide low-confidence hints (default)
174
+ vibeguard scan --all # show everything
175
+ ```
176
+
177
+ Suppress inline with a reason:
178
+
179
+ ```js
180
+ const key = "sk_live_..."; // vibeguard-ignore[secret.stripe-live-key]: test fixture
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Coverage & Limits
186
+
187
+ Detection depth is **not uniform across languages** — be honest about what you're getting:
188
+
189
+ | Language | Secrets / patterns | Dataflow taint | Engine |
190
+ |----------|:---:|:---:|--------|
191
+ | JavaScript / TypeScript | ✅ | ✅ interprocedural + cross-file | AST (acorn) |
192
+ | Python | ✅ | ⚠️ heuristic (line-proximity, single-file) | regex |
193
+ | Go | ✅ | ⚠️ targeted rules (e.g. `fmt.Sprintf` SQL) | regex |
194
+ | Java / PHP / Ruby / C# / Rust | ✅ | ❌ pattern-only | regex |
195
+
196
+ **Engine modes.** Full precision needs the optional `acorn` parser. Without it VibeGuard runs `regex-only` and says so loudly on every scan:
197
+
198
+ ```
199
+ ⚠ engine: regex-only — acorn not installed, AST/taint precision disabled.
200
+ ```
201
+
202
+ Install precision: `npm i -D acorn acorn-walk acorn-typescript`.
203
+
204
+ **Fail-loud, never fail-silent.** If any analysis pass errors or a file fails to parse, VibeGuard reports degraded coverage instead of pretending the scan was clean:
205
+
206
+ ```
207
+ ⚠ degraded coverage: 2 file(s) not fully analyzed [passes: ast, taint].
208
+ ```
209
+
210
+ Use `vibeguard scan --strict` to make a degraded scan a hard failure (exit 3) in CI.
211
+
212
+ **Fast modes.** `--changed` rescans only files changed since the last scan (SHA-256 cache; ~100×+ faster warm re-scans). `--staged` scans only git-staged files — ideal for a pre-commit hook. Both are per-file (cross-file analysis skipped; run a full scan for that). `--no-suppress` ignores inline `vibeguard-ignore` comments and the heuristic FP filter for a CI trust gate.
213
+
214
+ **The shell guard is a mistake-catcher, not a sandbox.** It normalizes common obfuscation (base64, `$IFS`, variable indirection, quote-splitting) and blocks accidental / AI-generated dangerous commands. A determined adversary who knows the patterns can still evade it — it is not sandbox-escape prevention.
215
+
216
+ ---
217
+
218
+ ## Benchmark
219
+
220
+ Measured against a curated corpus of 121 files (90 vuln + 31 clean). Not a vanity number.
221
+
222
+ <!-- BENCHMARK:START -->
223
+ <!-- Auto-generated by `npm run benchmark` — do not edit manually -->
224
+
225
+ ## Summary
226
+
227
+ | Category | TP | FP | FN | Precision | Recall | F1 |
228
+ |----------|----|----|----|-----------|--------|----|
229
+ | injection | 43 | 5 | 6 | 89.6% | 87.8% | 88.7% |
230
+ | secrets | 19 | 7 | 2 | 73.1% | 90.5% | 80.9% |
231
+ | xss | 16 | 0 | 1 | 100.0% | 94.1% | 97.0% |
232
+ | path-traversal | 9 | 1 | 1 | 90.0% | 90.0% | 90.0% |
233
+ | ai-safety | 8 | 2 | 6 | 80.0% | 57.1% | 66.7% |
234
+ | **OVERALL** | **95** | **15** | **16** | **86.4%** | **85.6%** | **86.0%** |
235
+
236
+ ## Per-Category Details
237
+
238
+ ### injection
239
+
240
+ | File | Rule ID | Verdict |
241
+ |------|---------|---------|
242
+ | sql-concat.js | `code.sql-injection` | TP |
243
+ | sql-concat.js | `taint.sql-injection` | TP |
244
+ | sql-concat2.js | `code.sql-injection` | TP |
245
+ | sql-concat2.js | `taint.sql-injection` | TP |
246
+ | sql-concat3.js | `code.sql-injection` | TP |
247
+ | sql-template.js | `db.sql-template-literal` | TP |
248
+ | sql-template.js | `taint.sql-injection` | FN |
249
+ | sql-template2.js | `db.sql-template-literal` | FN |
250
+ | sql-template2.js | `taint.sql-injection` | TP |
251
+ | sql-template3.js | `db.sql-template-literal` | TP |
252
+ | sql-template3.js | `taint.sql-injection` | FN |
253
+ | sql-raw-rb.js | `code.sql-injection` | TP |
254
+ | sql-raw2.js | `db.sql-template-literal` | TP |
255
+ | sql-knex.js | `code.sql-injection` | TP |
256
+ | sql-knex.js | `mikroorm.identifier-from-request` | FP |
257
+ | sql-sequelize.js | `code.sql-injection` | TP |
258
+ | sql-fstring.py | `py.sql-injection` | TP |
259
+ | sql-fstring2.py | `py.sql-injection` | TP |
260
+ | sql-py-concat.py | `py.sql-injection` | FN |
261
+ | sql-sprintf.go | `go.sql-fmt-sprintf` | TP |
262
+ | sql-sprintf.go | `go.sql-injection` | FP |
263
+ | sql-sprintf2.go | `go.sql-fmt-sprintf` | TP |
264
+ | sql-sprintf2.go | `go.sql-injection` | FP |
265
+ | sql-kotlin.kt | `kotlin.sql-injection` | TP |
266
+ | sql-csharp.cs | `csharp.sql-injection` | TP |
267
+ | cmd-concat.js | `taint.command-injection` | TP |
268
+ | cmd-concat.js | `ast.command-injection` | TP |
269
+ | cmd-template.js | `taint.command-injection` | TP |
270
+ | cmd-template.js | `ast.command-injection` | TP |
271
+ | cmd-concat2.js | `taint.command-injection` | TP |
272
+ | cmd-concat2.js | `ast.command-injection` | TP |
273
+ | cmd-spawn.js | `taint.command-injection` | FN |
274
+ | cmd-py.py | `py.os-system` | TP |
275
+ | cmd-py2.py | `py.subprocess-shell-true` | TP |
276
+ | cmd-py3.py | `py.os-system` | TP |
277
+ | cmd-go.go | `go.command-injection` | TP |
278
+ | eval-input.js | `ast.eval-dynamic` | TP |
279
+ | eval-template.js | `ast.eval-dynamic` | TP |
280
+ | eval-template.js | `taint.code-injection` | FP |
281
+ | eval-new-function.js | `ast.function-constructor` | TP |
282
+ | eval-new-function.js | `ast.mass-assignment` | FP |
283
+ | nosql.js | `ast.nosql-injection` | TP |
284
+ | nosql2.js | `ast.nosql-injection` | TP |
285
+ | nosql3.js | `ast.nosql-injection` | TP |
286
+ | nosql-where.js | `ast.nosql-injection` | TP |
287
+ | proto-poll.js | `injection.prototype-pollution` | TP |
288
+ | proto-poll.js | `ast.mass-assignment` | TP |
289
+ | proto-poll2.js | `injection.prototype-pollution` | TP |
290
+ | proto-poll3.js | `injection.prototype-pollution` | TP |
291
+ | ssrf.js | `ast.ssrf` | TP |
292
+ | ssrf2.js | `ast.ssrf` | FN |
293
+ | ssrf2.js | `taint.ssrf` | TP |
294
+ | open-redirect.js | `web.open-redirect` | TP |
295
+ | open-redirect2.js | `taint.open-redirect` | TP |
296
+
297
+ ### secrets
298
+
299
+ | File | Rule ID | Verdict |
300
+ |------|---------|---------|
301
+ | openai-key.js | `secret.openai-key` | TP |
302
+ | openai-key2.js | `secret.anthropic-key` | TP |
303
+ | github-token.js | `secret.github-token` | TP |
304
+ | github-token2.js | `secret.github-token` | TP |
305
+ | github-token2.js | `secret.high-entropy` | FP |
306
+ | stripe-key.js | `secret.stripe-live-key` | TP |
307
+ | stripe-key.js | `secret.generic-credential` | TP |
308
+ | stripe-key.js | `stripe.key-in-client` | FP |
309
+ | stripe-restricted.js | `secret.stripe-restricted-key` | TP |
310
+ | slack-token.js | `secret.slack-token` | TP |
311
+ | gitlab-token.js | `secret.gitlab-token` | TP |
312
+ | sendgrid-key.js | `secret.sendgrid-key` | TP |
313
+ | npm-token.js | `secret.npm-token` | TP |
314
+ | npm-token.js | `secret.high-entropy` | FP |
315
+ | gcp-key.js | `secret.gcp-api-key` | FN |
316
+ | private-key.js | `secret.private-key` | TP |
317
+ | aws-key.js | `secret.aws-access-key` | TP |
318
+ | mailgun-key.js | `secret.mailgun-key` | TP |
319
+ | mailgun-key.js | `secret.high-entropy` | FP |
320
+ | telegram-token.js | `secret.telegram-bot-token` | FN |
321
+ | resend-key.js | `secret.resend-key` | TP |
322
+ | conn-string.js | `secret.conn-string-password` | TP |
323
+ | conn-string.js | `secret.connection-string` | FP |
324
+ | generic-secret.js | `secret.generic-credential` | TP |
325
+ | docker-build-arg.js | `secret.docker-build-arg` | TP |
326
+ | docker-build-arg.js | `ai.key-in-url` | FP |
327
+ | env-secret.js | `secret.aws-secret-in-env` | TP |
328
+ | env-secret.js | `secret.high-entropy` | FP |
329
+
330
+ ### xss
331
+
332
+ | File | Rule ID | Verdict |
333
+ |------|---------|---------|
334
+ | reflected-xss.js | `xss.reflected-response` | TP |
335
+ | reflected-xss.js | `taint.xss-reflected` | TP |
336
+ | reflected-xss2.js | `xss.reflected-response` | TP |
337
+ | reflected-xss2.js | `taint.xss-reflected` | TP |
338
+ | reflected-xss3.js | `xss.reflected-response` | TP |
339
+ | reflected-xss3.js | `taint.xss-reflected` | TP |
340
+ | reflected-xss4.js | `xss.reflected-response` | TP |
341
+ | reflected-xss4.js | `taint.xss-reflected` | TP |
342
+ | innerhtml.js | `injection.xss-angular-innerHTML` | TP |
343
+ | innerhtml.js | `taint.xss-dom` | TP |
344
+ | innerhtml2.js | `injection.xss-innerhtml-direct` | TP |
345
+ | innerhtml2.js | `taint.xss-dom` | TP |
346
+ | dangerously-html.jsx | `react.dangerous-html` | TP |
347
+ | dangerously-html2.jsx | `react.dangerous-html` | TP |
348
+ | dangerously-html2.jsx | `ai.llm-output-dom` | TP |
349
+ | vue-v-html.js | `injection.xss-vue-v-html` | FN |
350
+ | eval-llm-output.js | `ai.llm-output-dom` | TP |
351
+
352
+ ### path-traversal
353
+
354
+ | File | Rule ID | Verdict |
355
+ |------|---------|---------|
356
+ | read-concat.js | `taint.path-traversal` | TP |
357
+ | sendfile.js | `taint.path-traversal` | TP |
358
+ | read-template.js | `taint.path-traversal` | TP |
359
+ | read-template.js | `ai.tool-broad-file-access` | TP |
360
+ | write-concat.js | `taint.path-traversal` | TP |
361
+ | unlink-concat.js | `taint.path-traversal` | TP |
362
+ | create-read-stream.js | `taint.path-traversal` | TP |
363
+ | append-file.js | `taint.path-traversal` | TP |
364
+ | path-join-template.js | `taint.path-traversal` | FN |
365
+ | path-join-template.js | `upload.filename-path-traversal` | TP |
366
+ | allowlist.js | `taint.path-traversal` | FP |
367
+
368
+ ### ai-safety
369
+
370
+ | File | Rule ID | Verdict |
371
+ |------|---------|---------|
372
+ | user-in-system-prompt.js | `ai.user-input-in-system-prompt` | TP |
373
+ | llm-output-exec.js | `ai.llm-output-exec` | TP |
374
+ | llm-output-exec.js | `taint.command-injection` | TP |
375
+ | llm-output-exec.js | `ai.llm-output-shell` | FP |
376
+ | llm-output-exec.js | `ast.command-injection` | FP |
377
+ | agent-loop-no-cap.js | `ai.agent-loop-no-cap` | TP |
378
+ | model-id-user-input.js | `ai.model-id-injection` | TP |
379
+ | tool-result-injection.js | `ai.tool-result-injection` | FN |
380
+ | agent-memory-poison.js | `ai.memory-poisoning` | FN |
381
+ | tool-poisoning.js | `ai.tool-poisoning` | TP |
382
+ | tool-poisoning.js | `ai.mcp-description-injection-deep` | TP |
383
+ | prompt-extraction.js | `ai.prompt-extraction` | FN |
384
+ | llm-output-dom.js | `ai.llm-output-dom` | TP |
385
+ | agent-deploy.js | `ai.agent-can-deploy` | FN |
386
+ | agent-secrets.js | `ai.agent-can-access-secrets` | FN |
387
+ | model-id-template.js | `ai.model-id-injection` | FN |
388
+
389
+ ## Methodology
390
+
391
+ - **True Positive (TP)**: Expected rule fires on a vuln file.
392
+ - **False Positive (FP)**: Any finding on a clean file, or an unexpected rule on a vuln file.
393
+ - **False Negative (FN)**: Expected rule that did not fire on a vuln file.
394
+ - **Precision** = TP / (TP + FP)
395
+ - **Recall** = TP / (TP + FN)
396
+ - **F1** = 2 * (Precision * Recall) / (Precision + Recall)
397
+
398
+ Generated: 2026-07-12T18:25:03.049Z
399
+
400
+ <!-- BENCHMARK:END -->
401
+
402
+ ---
403
+
404
+ ## Commands
405
+
406
+ ```bash
407
+ vibeguard scan [dir] # scan a project (auto-detects framework)
408
+ vibeguard scan --fix # scan + apply safe auto-fixes
409
+ vibeguard scan --all # show all findings including low-confidence
410
+ vibeguard auto [dir] # full protection (daemon + hooks + shell guard)
411
+ vibeguard auto --stop # turn off, restore backups
412
+ vibeguard fix [dir] # auto-fix 43 rule types
413
+ vibeguard pre-deploy [dir] # 13-gate deployment check
414
+ vibeguard mcp # MCP server (for AI client integration)
415
+ vibeguard guard "command" # check a shell command before running it
416
+ vibeguard install-hook # git pre-commit hook (blocks on critical)
417
+ vibeguard install-hook-post # PostToolUse hook (auto-scan AI edits)
418
+ ```
419
+
420
+ ---
421
+
422
+ ## Privacy
423
+
424
+ VibeGuard runs entirely on your machine. No telemetry, no analytics, no network calls by default.
425
+
426
+ | Command | Network? |
427
+ |---------|---------|
428
+ | `scan`, `fix`, `auto`, `mcp`, `install` | Never |
429
+ | `cve` (package name lookup) | Opt-in, OSV.dev only |
430
+ | `url` (header scan) | Opt-in, URL you provide |
431
+
432
+ The runtime interceptor adds guardrails that make data exfiltration significantly harder — it wraps `fetch`, `http.request`, `child_process.exec`, and `fs.readFileSync` to block outbound secrets, PII, and sensitive file access. It is not a sandbox escape prevention layer.
433
+
434
+ ---
435
+
436
+ ## Honest Scope
437
+
438
+ VibeGuard catches the mechanical security holes that AI coding tools leave behind. It does **not**:
439
+
440
+ - Prove your app is safe or leak-proof
441
+ - Track personal data end-to-end through your app
442
+ - Judge business logic flaws
443
+ - Replace a real security review for anything touching money, auth, or personal data
444
+
445
+ It raises the floor fast — catching the holes that AI tools create by default. The benchmark numbers above are honest: 86.0% F1 means it misses ~14% of real issues and produces some false positives. Run `npm run benchmark` to reproduce. Read the per-category details in `test/benchmark/benchmark-results.md` before relying on it.
446
+
447
+ ---
448
+
449
+ ## Languages
450
+
451
+ JavaScript, TypeScript, Python, Go, Java, Ruby, PHP, C#, Rust, Kotlin, Swift, Bash, SQL, YAML. Language-specific rules are gated by file extension — Go rules don't fire on `.js` files.
452
+
453
+ ---
454
+
455
+ ## CI/CD
456
+
457
+ ```bash
458
+ vibeguard auto --ci # non-interactive, exit non-zero on critical
459
+ vibeguard init-ci # generate GitHub Actions workflow
460
+ vibeguard scan --output sarif # SARIF output for GitHub Code Scanning
461
+ ```
462
+
463
+ Templates included for GitLab CI, Jenkins, CircleCI, Azure Pipelines.
464
+
465
+ ---
466
+
467
+ ## Development
468
+
469
+ ```bash
470
+ npm install
471
+ npm test # 342 tests
472
+ npm run benchmark # precision/recall/F1
473
+ npm run counts # verify rule/tool counts match source
474
+ npm run lint # 0 errors
475
+ ```
476
+
477
+ ---
478
+
479
+ ## License
480
+
481
+ MIT. Free forever. No ads. No tracking. No data collection.
482
+
483
+ ---
484
+
485
+ <div align="center">
486
+
487
+ ## Built by Yagyesh Vyas
488
+
489
+ <p>
490
+ <a href="https://github.com/yagyeshVyas"><img src="https://img.shields.io/badge/GitHub-yagyeshVyas-181717?style=for-the-badge&logo=github&logoColor=white" alt="GitHub" /></a>
491
+ <a href="https://www.linkedin.com/in/yagyeshvyas"><img src="https://img.shields.io/badge/LinkedIn-Yagyesh%20Vyas-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn" /></a>
492
+ <a href="https://www.npmjs.com/~yagyeshvyas"><img src="https://img.shields.io/badge/npm-@yagyeshvyas-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="npm" /></a>
493
+ <a href="https://vibe-guard-site-ivory.vercel.app/"><img src="https://img.shields.io/badge/Website-vibe--guard--site-ivory.vercel.app-000000?style=for-the-badge&logo=vercel&logoColor=white" alt="Website" /></a>
494
+ </p>
495
+
496
+ Found a bug? [Open an issue](https://github.com/yagyeshVyas/VibeGuard/issues). &bull; Have a question? [Start a discussion](https://github.com/yagyeshVyas/VibeGuard/discussions).
497
+
498
+ <sub>&copy; 2026 Yagyesh Vyas. Released under the MIT License.</sub>
499
+
600
500
  </div>