@yagyeshvyas/vibeguard 1.3.0 → 1.11.1
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/.vibeguard-mcp.example.json +51 -0
- package/CHANGELOG.md +604 -216
- package/MCP-FIREWALL.md +296 -0
- package/README.md +355 -31
- package/bin/cli.js +355 -27
- package/bin/cmd-agent-monitor.js +45 -0
- package/bin/cmd-agent-risk.js +64 -0
- package/bin/cmd-gif.js +62 -0
- package/bin/cmd-git-scan.js +74 -0
- package/bin/cmd-llm-proxy.js +164 -0
- package/bin/cmd-mcp-firewall.js +191 -0
- package/bin/cmd-pentest.js +103 -0
- package/bin/cmd-platform.js +137 -0
- package/bin/cmd-pr-scan.js +135 -0
- package/bin/cmd-sbom-diff.js +38 -0
- package/bin/cmd-skill-scan.js +35 -0
- package/docs/AISVS.md +25 -0
- package/docs/ARCHITECTURE.md +81 -0
- package/docs/INSTALLATION.md +139 -0
- package/docs/WINDOWS.md +74 -0
- package/docs/security-policy.strict.example.json +134 -0
- package/docs/security-policy.strict.example.pub.pem +3 -0
- package/package.json +45 -7
- package/src/.vibeguard/cache/file-hashes.json +60 -0
- package/src/.vibeguard/latest-snapshot.json +36 -0
- package/src/.vibeguard/mcp-pins.json +1 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/dashboard.js +279 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/hook.js +151 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/install.js +299 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/manifest.json +65 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/mcp-server.js +2051 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/plugin.js +168 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/pre-deploy.js +362 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/repl.js +150 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/rules.js +1611 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/sbom.js +164 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/shell-guard.js +292 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/slopsquat.js +144 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/trace.js +220 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/install.js +299 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/manifest.json +37 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/mcp-server.js +2055 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/plugin.js +168 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/pre-deploy.js +362 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/trace.js +220 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/dashboard.js +279 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/hook.js +151 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/install.js +299 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/manifest.json +65 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/mcp-server.js +2055 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/plugin.js +168 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/pre-deploy.js +362 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/repl.js +150 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/rules.js +1611 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/sbom.js +164 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/shell-guard.js +292 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/slopsquat.js +144 -0
- package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/trace.js +220 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/dashboard.js +279 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/hook.js +151 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/install.js +299 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/manifest.json +65 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/mcp-server.js +2054 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/plugin.js +168 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/pre-deploy.js +362 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/repl.js +150 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/rules.js +1611 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/sbom.js +164 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/shell-guard.js +292 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/slopsquat.js +144 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/trace.js +220 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/install.js +299 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/manifest.json +37 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/mcp-server.js +2055 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/plugin.js +168 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/pre-deploy.js +362 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/trace.js +220 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/auto.js +428 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/daemon.js +344 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/engine.js +297 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/manifest.json +33 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/mcp-server.js +2055 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/rules.js +1611 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/shell-guard.js +292 -0
- package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/trace.js +220 -0
- package/src/.vibeguard-baseline.json +5226 -0
- package/src/action-guard.js +84 -6
- package/src/agent-monitor.js +262 -0
- package/src/agent-policy.js +642 -0
- package/src/agent-risk.js +271 -0
- package/src/agentic.js +1513 -0
- package/src/ast.js +165 -7
- package/src/audit-trail.js +212 -67
- package/src/auto.js +427 -427
- package/src/autofix.js +11 -4
- package/src/bundles.js +198 -0
- package/src/daemon.js +343 -343
- package/src/dashboard.js +278 -278
- package/src/engine.js +3 -0
- package/src/entropy.js +187 -0
- package/src/firewall.js +19 -3
- package/src/gif.js +134 -0
- package/src/gitscan.js +282 -0
- package/src/hook.js +151 -151
- package/src/injection-decode.js +136 -0
- package/src/install.js +298 -280
- package/src/integrity.js +16 -1
- package/src/integrity.json +43 -13
- package/src/interceptor.js +12 -9
- package/src/llm-proxy.js +986 -0
- package/src/mcp-audit.js +61 -5
- package/src/mcp-firewall.js +971 -0
- package/src/mcp-server.js +2500 -2047
- package/src/obfuscation.js +315 -0
- package/src/owasp-agentic.js +314 -0
- package/src/pentest.js +589 -0
- package/src/pii.js +4 -0
- package/src/platform/aisvs.js +38 -0
- package/src/platform/approval.js +187 -0
- package/src/platform/canonical.js +73 -0
- package/src/platform/contracts.js +158 -0
- package/src/platform/delegation.js +73 -0
- package/src/platform/http-gateway.js +177 -0
- package/src/platform/identity.js +253 -0
- package/src/platform/jwt.js +86 -0
- package/src/platform/mcp-http-bridge.js +199 -0
- package/src/platform/memory-guard.js +64 -0
- package/src/platform/os-sandbox.js +144 -0
- package/src/platform/policy.js +332 -0
- package/src/platform/sandbox-manager.js +92 -0
- package/src/platform/signed-audit.js +357 -0
- package/src/platform/ssrf.js +129 -0
- package/src/plugin.js +182 -168
- package/src/pre-deploy.js +170 -55
- package/src/privacy-audit.js +272 -272
- package/src/repl.js +150 -150
- package/src/report.js +7 -1
- package/src/routes.js +1210 -0
- package/src/rules-2026.js +1407 -0
- package/src/rules-pack.js +3068 -3019
- package/src/rules.js +376 -60
- package/src/sandbox.js +200 -10
- package/src/sbom.js +193 -164
- package/src/scanner.js +189 -33
- package/src/shell-guard.js +11 -0
- package/src/skill-scan.js +477 -0
- package/src/slopsquat.js +144 -144
- package/src/surface.js +408 -0
- package/src/taint-ast.js +204 -37
- package/src/taint.js +15 -3
- package/src/tokenlean.js +579 -0
- package/src/trace.js +220 -220
package/README.md
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="website/banner.svg" />
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="website/banner.svg" />
|
|
6
|
+
<img src="website/banner.svg" alt="VibeGuard — security scanner + AI agent firewall" width="880" />
|
|
7
|
+
</picture>
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=600&size=21&duration=2800&pause=900&color=22C55E¢er=true&vCenter=true&width=760&lines=%24+npx+%40yagyeshvyas%2Fvibeguard+scan;861+rules+%C2%B7+93+MCP+tools+%C2%B7+18+languages;catches+what+AI+forgets+%E2%80%94+before+you+ship;offline+by+default+%C2%B7+zero+telemetry+%C2%B7+free+forever" alt="Typing animation: npx @yagyeshvyas/vibeguard scan" /></a>
|
|
10
|
+
|
|
11
|
+
<h3>🔒 The AI-era security scanner & agent firewall.</h3>
|
|
6
12
|
|
|
7
13
|
<p>
|
|
8
14
|
Scan AI-generated code for leaked keys, SQLi, prompt injection, and uncapped agent loops.<br/>
|
|
9
|
-
<strong>
|
|
10
|
-
|
|
15
|
+
<strong>861 rules</strong> · <strong>93 MCP tools</strong> · <strong>18 languages</strong> · <strong>10 compliance frameworks</strong><br/>
|
|
16
|
+
Offline by default · Zero telemetry · No paid APIs · Free forever.
|
|
11
17
|
</p>
|
|
12
18
|
|
|
19
|
+
<p><strong>Security status: INTERNAL TESTING.</strong> Windows/macOS OS isolation is not implemented; Linux network/PID namespace isolation is available. See the <a href="research/RELEASE_READINESS.md">independent release gate</a>.</p>
|
|
20
|
+
|
|
13
21
|
<p>
|
|
14
22
|
<a href="https://www.npmjs.com/package/@yagyeshvyas/vibeguard"><img src="https://img.shields.io/npm/v/@yagyeshvyas/vibeguard?style=for-the-badge&logo=npm&logoColor=white" alt="npm version" /></a>
|
|
15
23
|
<a href="https://github.com/yagyeshVyas/VibeGuard/actions"><img src="https://img.shields.io/github/actions/workflow/status/yagyeshVyas/VibeGuard/ci.yml?style=for-the-badge&logo=github&logoColor=white" alt="CI" /></a>
|
|
@@ -17,14 +25,15 @@ Scan AI-generated code for leaked keys, SQLi, prompt injection, and uncapped age
|
|
|
17
25
|
</p>
|
|
18
26
|
|
|
19
27
|
<p>
|
|
20
|
-
<img src="https://img.shields.io/badge/
|
|
21
|
-
<img src="https://img.shields.io/badge/rules-
|
|
22
|
-
<img src="https://img.shields.io/badge/MCP%20tools-
|
|
28
|
+
<img src="https://img.shields.io/badge/benchmark-119%2F119%20cases-brightgreen?style=flat-square" alt="119/119 benchmark cases" />
|
|
29
|
+
<img src="https://img.shields.io/badge/rules-861-blue?style=flat-square" alt="861 rules" />
|
|
30
|
+
<img src="https://img.shields.io/badge/MCP%20tools-93-purple?style=flat-square" alt="93 MCP tools" />
|
|
23
31
|
<img src="https://img.shields.io/badge/languages-18-green?style=flat-square" alt="18 languages" />
|
|
24
32
|
<img src="https://img.shields.io/badge/compliance-10%20frameworks-orange?style=flat-square" alt="10 compliance frameworks" />
|
|
25
|
-
<img src="https://img.shields.io/badge/AI--safety%20F1-
|
|
33
|
+
<img src="https://img.shields.io/badge/AI--safety%20F1-96.8%25-brightgreen?style=flat-square" alt="AI-safety F1 96.8%" />
|
|
26
34
|
<img src="https://img.shields.io/badge/telemetry-zero-brightgreen?style=flat-square" alt="Zero telemetry" />
|
|
27
|
-
<img src="https://img.shields.io/badge/tests-
|
|
35
|
+
<img src="https://img.shields.io/badge/tests-623%20passed-blue?style=flat-square" alt="623 tests pass" />
|
|
36
|
+
<img src="https://img.shields.io/badge/self--scan-Grade%20A-brightgreen?style=flat-square" alt="Self-scan Grade A" />
|
|
28
37
|
</p>
|
|
29
38
|
|
|
30
39
|
<img src="website/demo.gif" alt="VibeGuard scan demo" width="640" />
|
|
@@ -43,11 +52,260 @@ Scan AI-generated code for leaked keys, SQLi, prompt injection, and uncapped age
|
|
|
43
52
|
<a href="#benchmark">📊 Benchmark</a> •
|
|
44
53
|
<a href="#commands">⌨️ Commands</a> •
|
|
45
54
|
<a href="https://vibe-guard-site-ivory.vercel.app/">🌐 Website</a> •
|
|
55
|
+
<a href="#why-vibeguard-wins-vs-every-other-ai-era-scanner">🏆 Wins vs. Others</a> •
|
|
46
56
|
<a href="#why-vibeguard">❓ Why</a> •
|
|
47
57
|
<a href="#honest-scope">⚖️ Limits</a>
|
|
48
58
|
|
|
49
59
|
</div>
|
|
50
60
|
|
|
61
|
+
<div align="center">
|
|
62
|
+
<sub>
|
|
63
|
+
<code>npx @yagyeshvyas/vibeguard scan</code> · Grade A-F · 0 API keys · offline by default · AI-specific rules Semgrep/Gitleaks/Trivy miss
|
|
64
|
+
</sub>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 🆕 What's New — v1.11.1
|
|
70
|
+
|
|
71
|
+
**Security foundation v2 (internal testing).** This release is not beta or
|
|
72
|
+
production-ready; it is the verified internal-testing build described in
|
|
73
|
+
[RELEASE_READINESS.md](research/RELEASE_READINESS.md).
|
|
74
|
+
|
|
75
|
+
- Signed Ed25519 policy v2, identity tokens, approvals and strict gateway audit.
|
|
76
|
+
- Strict MCP mode writes signed audit events by default and fails closed when
|
|
77
|
+
the audit sink is unavailable.
|
|
78
|
+
- Authenticated HTTP JSON-RPC + SSE MCP bridge over a stdio upstream.
|
|
79
|
+
- Stdio VGAT capability checks and signed single-use approval tokens.
|
|
80
|
+
- `--kill-on-block` quarantine response.
|
|
81
|
+
- Linux `unshare` network/PID namespace sandbox with `sandbox verify`.
|
|
82
|
+
- Memory provenance and multi-agent delegation guards; labeled detection corpus;
|
|
83
|
+
AISVS-style readiness mapping.
|
|
84
|
+
- **623 tests, 0 failures** on Windows Node24/Node18 and Linux Node22; 29/29
|
|
85
|
+
platform tests on Windows/Linux/macOS CI.
|
|
86
|
+
|
|
87
|
+
Install note: v1.11.1 is distributed as `@yagyeshvyas/vibeguard@1.11.1`. If a
|
|
88
|
+
registry mirror still serves an older build, use the exact
|
|
89
|
+
[v1.11.1 GitHub release tarball](https://github.com/yagyeshVyas/VibeGuard/releases/tag/v1.11.1).
|
|
90
|
+
|
|
91
|
+
## 🆕 What's New — v1.10.0
|
|
92
|
+
|
|
93
|
+
**The agent firewall release.** VibeGuard now guards the runtime plane, not just
|
|
94
|
+
the code plane: the MCP channel between an agent and its tools.
|
|
95
|
+
|
|
96
|
+
- **`vibeguard mcp-firewall` — a real-time MCP proxy.** Speaks the same
|
|
97
|
+
newline-delimited JSON-RPC over stdio, sits between the client and the
|
|
98
|
+
server, and inspects both directions. Poisoned tool definitions are removed
|
|
99
|
+
from `tools/list`; dangerous `tools/call` requests are answered locally and
|
|
100
|
+
**never forwarded**; secrets and PII are scrubbed from tool results before
|
|
101
|
+
they reach the model. `--selftest` runs 11 offline attack scenarios;
|
|
102
|
+
`--check '<json>'` evaluates a single call; `--status` summarizes the log.
|
|
103
|
+
- **Permission enforcement (`src/agent-policy.js`).** Per-tool allow/deny/
|
|
104
|
+
approval rules, capability gates, project-scoped filesystem access, denied
|
|
105
|
+
credential paths, egress allowlist, cloud-metadata block, argument limits and
|
|
106
|
+
per-minute call budgets. One JSON file, deterministic, readable.
|
|
107
|
+
- **Tool poisoning + rug-pull detection.** Injection text, hidden Unicode,
|
|
108
|
+
concealment instructions, forced invocation, encoded payloads and lying
|
|
109
|
+
`readOnlyHint` annotations are caught; every definition is hash-pinned on
|
|
110
|
+
first sight and blocked if it changes after approval.
|
|
111
|
+
- **Credential exfiltration prevention.** Live secrets in tool arguments,
|
|
112
|
+
credential-plus-destination shapes, secrets in URLs and credential-store
|
|
113
|
+
paths are blocked; secrets/PII in tool output are redacted before the model
|
|
114
|
+
sees them.
|
|
115
|
+
- **`vibeguard skill-scan` — malicious skill/plugin detection.** Scans
|
|
116
|
+
`SKILL.md`, `AGENTS.md`, `CLAUDE.md`, Cursor rules, Claude plugins,
|
|
117
|
+
marketplaces and embedded MCP configs for injection, exfiltration,
|
|
118
|
+
credential access, destructive commands, remote code loaders, obfuscation,
|
|
119
|
+
permission bypass, self-modification and risky packages.
|
|
120
|
+
- **`vibeguard agent-risk` + `vibeguard owasp-coverage`.** One 0-100 score and
|
|
121
|
+
A-F grade across MCP config, skills, runtime decisions, policy scope and
|
|
122
|
+
audit integrity. Every control is mapped to the **OWASP Agentic AI Top 10**
|
|
123
|
+
and **OWASP MCP Top 10** (20/20 mapped), with honest statuses
|
|
124
|
+
(enforced / detected / monitored / advisory).
|
|
125
|
+
- **`vibeguard agent-monitor`.** Runtime view of the hash-chained firewall log:
|
|
126
|
+
allowed/warned/blocked counts, top blocked tools and servers, behavior
|
|
127
|
+
anomalies, chain integrity. `--watch` tails it live.
|
|
128
|
+
- **Process-isolated sandbox.** `vibeguard sandbox --isolation process` runs
|
|
129
|
+
untrusted code in a separate Node process under the permission model (fs and
|
|
130
|
+
child_process denied, network modules blocked, env stripped, hard timeout,
|
|
131
|
+
memory cap). Node 18 falls back to the vm sandbox.
|
|
132
|
+
- **Tests:** 594 passing, 0 failures, including a live stdio proxy test that
|
|
133
|
+
spawns the CLI and a fixture MCP server. **Offline by default, zero telemetry,
|
|
134
|
+
Windows 11 supported.**
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
vibeguard mcp-firewall --selftest
|
|
138
|
+
vibeguard mcp-firewall --server filesystem
|
|
139
|
+
vibeguard skill-scan .
|
|
140
|
+
vibeguard agent-risk
|
|
141
|
+
vibeguard owasp-coverage
|
|
142
|
+
vibeguard agent-monitor --watch
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Full details, policy schema and honest limits: [MCP-FIREWALL.md](MCP-FIREWALL.md).
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Security baseline v2 — v1.11.1 status (internal testing)
|
|
150
|
+
|
|
151
|
+
This repository contains the v1.11.1 security foundation. It is **not** a
|
|
152
|
+
production-ready agent security platform. Linux network/PID namespace isolation
|
|
153
|
+
is available; Windows/macOS OS isolation is not implemented.
|
|
154
|
+
|
|
155
|
+
Implemented and tested:
|
|
156
|
+
|
|
157
|
+
- Strict default-deny policy engine (`src/platform/policy.js`) with signed
|
|
158
|
+
Ed25519 policy v2, realpath checks, shell-egress checks and deep secret
|
|
159
|
+
detection.
|
|
160
|
+
- Ed25519 agent capability tokens and signed single-use approvals.
|
|
161
|
+
- Signed, hash-chained audit events with Merkle checkpoints and a verifier;
|
|
162
|
+
**strict MCP gateway now writes signed events by default**.
|
|
163
|
+
- Offline EdDSA JWT/JWKS validation and SSRF/DNS-rebinding destination checks.
|
|
164
|
+
- All-method MCP response inspection in `mcp-firewall` (tools, resources,
|
|
165
|
+
prompts, unknown methods), size/depth limits and deep secret redaction.
|
|
166
|
+
- Authenticated loopback **HTTP JSON-RPC + SSE** MCP bridge with upstream stdio.
|
|
167
|
+
- Optional **kill-on-block/block-budget** quarantine response.
|
|
168
|
+
- **Linux network/PID namespace** sandbox with a live verification probe
|
|
169
|
+
(`vibeguard sandbox verify`); Windows/macOS OS backends remain unavailable.
|
|
170
|
+
- Memory provenance guard and signed multi-agent delegation library.
|
|
171
|
+
- Labeled detection corpus runner and AISVS-style readiness mapping.
|
|
172
|
+
- Target-controlled scanner plugins are **disabled by default**; code execution
|
|
173
|
+
requires an explicit operator trust flag.
|
|
174
|
+
- The process sandbox no longer passes host-realm objects into the user context;
|
|
175
|
+
it is still **unverified, same-user, and not an OS boundary**.
|
|
176
|
+
- Windows destructive-command coverage and a Windows/macOS CI platform job.
|
|
177
|
+
- Dependency audit gate; MCP SDK upgraded and vulnerable transitive packages
|
|
178
|
+
overridden.
|
|
179
|
+
|
|
180
|
+
Not implemented or not verified:
|
|
181
|
+
|
|
182
|
+
- **Windows AppContainer/Job Object/WFP and macOS VM backends**; Linux
|
|
183
|
+
namespace filesystem is not isolated and is not a container/VM. Run
|
|
184
|
+
`vibeguard sandbox verify` on Linux; Windows/macOS must not claim isolation.
|
|
185
|
+
- **External audit anchor/transparency log**; local sidecar deletion/rollback
|
|
186
|
+
is not detectable. Non-strict gateway audit is still the legacy hash chain.
|
|
187
|
+
- **Authenticated approval service/UI**: the signed token verifier is
|
|
188
|
+
implemented, but `ApprovalBroker.decide()` still accepts a human string.
|
|
189
|
+
- Remote TLS/mTLS/OAuth multi-session deployment; HTTP bridge is loopback-tested
|
|
190
|
+
JSON/SSE, not a full remote service.
|
|
191
|
+
- Persistent memory/multi-agent runtime; `MemoryGuard`/`DelegationGraph` are
|
|
192
|
+
tested libraries only.
|
|
193
|
+
- Independent penetration test, representative precision/recall corpus, macOS
|
|
194
|
+
full-suite evidence and npm registry publication (NPM_TOKEN missing).
|
|
195
|
+
- Dashboard/SDK and full AISVS certification; AISVS is an internal mapping.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
Read the evidence before relying on any control:
|
|
199
|
+
|
|
200
|
+
- [Implementation status](reports/implementation-status.md)
|
|
201
|
+
- [Security test results](reports/security-test-results.md)
|
|
202
|
+
- [Attack benchmark](reports/attack-benchmark.md)
|
|
203
|
+
- [Known limitations](reports/known-limitations.md)
|
|
204
|
+
- [Release readiness](reports/release-readiness.md)
|
|
205
|
+
- [v2 architecture](docs/ARCHITECTURE.md) · [installation](docs/INSTALLATION.md) · [Windows](docs/WINDOWS.md)
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🆕 What's New — v1.9.0
|
|
210
|
+
|
|
211
|
+
Three things no other offline scanner does: it knows which findings are **live**, it writes the **exploit chain**, and it reads the **build artifact** where secrets actually ship.
|
|
212
|
+
|
|
213
|
+
- 🎯 **Reachability-native findings.** Every scan now builds the entrypoint graph and annotates each finding `direct` / `imported` / `dead`. `--live` reports only what an app entrypoint can actually reach; dead findings sort last by default; `--reachability-grade` grades dead code one tier lower so a test fixture stops looking like production. Measured on Juice Shop: **306 live findings vs 3,157 in code no route imports** — the noise rivals charge money to filter, computed locally in ~200 ms.
|
|
214
|
+
- 🧭 **Deterministic exploit chains.** `vibeguard attack-surface` now emits chains: `precondition → entrypoint → sink → impact`. Unauthenticated route → command injection → remote code execution (CWE-94); IDOR endpoint → cross-user data access (CWE-639); SSRF → cloud metadata credential theft. No LLM, identical input → identical chain — the narrative capability of ZeroPath/DryRun without their nondeterminism or per-scan cost.
|
|
215
|
+
- 🧱 **`vibeguard bundle-scan` — secrets in `dist/`, `build/`, `.next/static`, `out/`.** Every source scanner skips build output; that is exactly where bundlers inline `process.env` values and `NEXT_PUBLIC_*` secrets. Reuses the 75 secret rules + entropy engine on minified artifacts and flags shipped source maps. A key found here is public to every visitor.
|
|
216
|
+
- 🔗 **Agent surface:** `scan_bundle` + `live`/`reachabilityGrade` on `scan_project`; `attack_surface` returns chains in JSON and in the lean payload.
|
|
217
|
+
- 🧪 **564 tests, 0 failures** · **861 rules** · **93 MCP tools** · Grade A self-scan.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
vibeguard scan . --live # only what production can reach
|
|
221
|
+
vibeguard scan . --reachability-grade # dead code does not dominate the grade
|
|
222
|
+
vibeguard attack-surface . # chains included in the report
|
|
223
|
+
vibeguard bundle-scan # secrets that shipped in dist/
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 🆕 What's New — v1.8.0
|
|
229
|
+
|
|
230
|
+
The release that scans what AI code actually gets wrong — and answers with a map instead of a list.
|
|
231
|
+
|
|
232
|
+
Built from the 2025-26 evidence base: Veracode GenAI (45% of generated samples shipped an OWASP Top-10 flaw), CSA/CodeRabbit (1.91× IDOR in AI-co-authored PRs), GitGuardian 2026 (AI-assisted commits leak secrets at 3.2% vs 1.5%), Escape.tech (65% of vibe-coded apps had a security issue, 58% at least one critical).
|
|
233
|
+
|
|
234
|
+
- 🗺️ **`vibeguard attack-surface [dir]` — entrypoints × auth × reachability.** Extracts entrypoints across Next.js App Router / Pages API / **Server Actions**, Express, Fastify, Hono, NestJS, tRPC, Supabase Edge Functions, serverless handlers, FastAPI/Flask/Django, Rails, Gin/Echo and MCP tool registrations; resolves router mounts and middleware chains; joins them with the findings and the import graph. Output: which endpoint is reachable *today*, what actually fires inside its handler (direct vs imported), and which findings sit in dead code. Exit codes: 2 = unguarded state-changing route, 1 = exposed risk.
|
|
235
|
+
- 🚪 **Authorization intelligence** — handler body extent by brace matching, in-body guard detection (auth()/getServerSession/requireUser/…), **IDOR** (row fetched by `params.id` with no owner/tenant predicate), unguarded state-changing routes, Server Actions treated as the public RPC endpoints they are, and middleware matchers that exclude `/api` (CVE-2025-29927 class). No mainstream SAST models these on the data path.
|
|
236
|
+
- 🧪 **118 new rules (743 → 861)** — Supabase **RLS correctness** (`USING (true)`, SECURITY DEFINER without `search_path`, service_role in the client, `GRANT ALL`), Firebase rules, JWT decode-not-verify / alg:none / weak fallback / cookie flags, LLM output → exec/SQL/HTML, system-prompt injection, missing `max_tokens`, unbounded agent loops, md5 passwords, `Math.random()` OTPs, ECB/static IV, CWE-117 log injection (the most-failed class in the Veracode report), 13 new secret formats (OpenRouter, Groq, HuggingFace, NVIDIA, Supabase PAT, service_role JWT…), CI script injection, exposed compose/Docker/Terraform, SSRF/SSTI/open redirect/header injection.
|
|
237
|
+
- 🕵️ **Backdoor engine + `scan_backdoors` MCP tool** — decodes base64/hex/unicode/fromCharCode layers, flags encoded payloads in executable position, javascript-obfuscator fingerprints, fetch→eval loaders, curl|sh, PowerShell `-enc`, remote imports, hidden Unicode/bidi (Trojan-Source class), and capability combinations (exec + network + env = dropper/exfil). Skips minified vendor bundles so it stays quiet on real repos.
|
|
238
|
+
- 🧬 **AST coverage fix (critical)** — every `.jsx` file failed to parse (no JSX plugin) and every `.tsx` crashed the walker (`No walker function defined for node type JSXElement`), silently disabling AST/taint on most React/Next code. Fixed with a JSX parser and JSX walkers merged into acorn-walk's base, plus a generic TS-node fallback. Self-scan degraded files: **27 → 0**.
|
|
239
|
+
- 🔥 **Firebase `.rules` files are scanned at all now** — the extension was never in the allowlist, so open Firestore/Storage rules were invisible.
|
|
240
|
+
- 🧪 **564 tests, 0 failures** · **861 rules** · **93 MCP tools** · Grade A self-scan.
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
vibeguard attack-surface . # what is exposed right now, ranked
|
|
244
|
+
vibeguard attack-surface . --lean # same map, token-lean for an agent
|
|
245
|
+
vibeguard attack-surface . --json # full entrypoint graph for CI
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 🆕 What's New — v1.7.0
|
|
251
|
+
|
|
252
|
+
<details open>
|
|
253
|
+
<summary><strong>Jump to: the Grade A bug · laundered-source dataflow · one finding per vulnerability · no more silent fail-open</strong></summary>
|
|
254
|
+
|
|
255
|
+
**v1.7 started with a bug report against ourselves.** This file:
|
|
256
|
+
|
|
257
|
+
```js
|
|
258
|
+
db.query(`SELECT * FROM users WHERE id = ${req.body.id}`);
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
— textbook SQL injection, the single most common shape in AI-generated code — scanned as **`No issues found. Grade A.`** The worst failure a security scanner can have is not a missed finding; it is a *confident all-clear* on live, exploitable code.
|
|
262
|
+
|
|
263
|
+
- 🎯 **Root cause, fixed.** The AST taint pass deferred any sink argument "containing a source" to the regex layer. That is defensible for a *bare* source (`db.query(req.body.sql)` — same expression, same text), but a **constructed** argument is different text entirely, so the regex layer routinely missed it and the finding fell through the gap. Deferral is now limited to genuinely bare sources, and the three code-execution-grade sinks (SQL / shell / `eval`) never defer at all.
|
|
264
|
+
- 🧪 **Laundered sources now tracked**: destructuring (`const { id } = req.body`), reassignment chains, optional chaining (`req.body?.id`), nested index access (`req.body.filters[0]`), and `spawn("sh", ["-c", ...])`.
|
|
265
|
+
- ↩️ **Return-value taint across functions.** `function getId(r) { return r.body.id }` followed by `db.query(\`...${getId(req)}\`)` is now caught — the direction of cross-function flow that was missing. Precise by construction: it only fires when the call site actually passes a source, so `getId(config)`, a sanitizing helper, and a constant-returning helper all stay clean.
|
|
266
|
+
- 🔁 **One vulnerability, one finding.** A dataflow-confirmed result now supersedes every weaker rule on the same line (including three overlapping Go SQL rules that used to triple-report a single `fmt.Sprintf` injection).
|
|
267
|
+
- 🚨 **No more silent fail-open.** A crash inside the AST taint pass used to drop analysis to the weaker regex engine *silently* — every dataflow finding vanished while the scan still printed a clean grade. It is now recorded as degraded coverage, so the CLI warns and `--strict` refuses to call that scan clean. (Found the honest way: a temporal-dead-zone bug of mine triggered exactly this, and nothing said a word.)
|
|
268
|
+
- 🎯 **`process` is no longer a blanket taint source.** Only `argv`/`argv0`/`env` carry outside input; `process.execPath`, `platform`, `version` and friends do not. Treating the whole namespace as attacker-controlled made `spawn(process.execPath, [script])` — the standard way to launch a child Node process — look like command injection.
|
|
269
|
+
- 📊 **Harder benchmark, honest scoring.** Added 8 laundered-source and 8 adversarial-clean cases. The scorer now runs the same de-duplication the product does, so it measures what a user actually sees instead of raw pre-dedupe rule hits. Result: **119/119 cases, 0 FP, 0 FN** (was 96.0% F1). See the caveat in [Benchmark](#benchmark) — a saturated corpus means the corpus got easy, not that the scanner is perfect.
|
|
270
|
+
- 🧪 **508 tests, 0 failures** (11 new regression tests, all asserted against a *default* scan — a finding only visible under `--all` is not protection) · **861 rules** · **93 MCP tools** · Grade A self-scan on 309 files.
|
|
271
|
+
|
|
272
|
+
</details>
|
|
273
|
+
|
|
274
|
+
<details>
|
|
275
|
+
<summary><strong>v1.6.0 — token-lean agent protocol · budgets · delta scans · <code>vibeguard tokens</code></strong></summary>
|
|
276
|
+
|
|
277
|
+
Every security scanner answers an AI agent with pretty-printed JSON — two-space indentation, repeated object keys, and the same `message` and `fix` string duplicated once per occurrence. On a real repository that is thousands of tokens of pure redundancy, paid for on **every single tool call**. v1.6 fixes that.
|
|
278
|
+
|
|
279
|
+
- 🪶 **TLAP — the Token-Lean Agent Protocol** (`vibeguard scan --lean`, and the default dialect for the MCP server). Same information, no findings dropped, encoded for a context window instead of a terminal: rule text stated once per rule rather than once per site, directory prefixes dictionary-coded, line-oriented instead of nested JSON. **Measured on this repo: 64,076 → 5,492 tokens, a 91.4% cut per scan call.**
|
|
280
|
+
- 🎯 **Hard token budgets** (`--budget 2000`, or `VIBEGUARD_TOKEN_BUDGET`). The budget is spent on the highest-**risk** findings first — severity × confidence, with dataflow-confirmed and exploitable rules outranking pattern-only matches at equal severity. Anything cut is reported as an explicit rollup that states `NOT an all-clear`. A clipped scan can never be misread as a clean one.
|
|
281
|
+
- ⚡ **Delta scans** (`--lean --delta`). In an edit→scan→fix loop, the common answer is "nothing changed" — and that answer now costs **~20 tokens instead of ~5,000**. New findings are shown; already-reported ones are not repeated. Resolved findings are counted.
|
|
282
|
+
- 🔧 **Lean fix plans** — `suggest_fixes` states each remediation once per rule and drops the diagnosis, because when the task is "apply the fix" the diagnosis is not what the agent needs.
|
|
283
|
+
- 🛡️ **Context-window DoS protection** — a 14th defense layer clamps *any* of the 93 MCP tools to the budget, so one dependency-tree dump can't evict an agent's working memory. Truncation is always disclosed.
|
|
284
|
+
- 📐 **`vibeguard tokens [dir]`** — reproduce the savings claim on your own repository. No marketing number you have to take on faith.
|
|
285
|
+
- 🔒 **Zero new dependencies.** The token estimator is an offline model (~±10% of a real BPE tokenizer), because VibeGuard stays zero-dependency and offline by contract.
|
|
286
|
+
- 🧪 **497 tests, 0 failures** · **861 rules** · **93 MCP tools** · Grade A self-scan on 293 files.
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
vibeguard scan --lean --budget 2000 # fits any context window, highest-risk first
|
|
290
|
+
vibeguard scan --lean --delta # only what changed since the last scan
|
|
291
|
+
vibeguard tokens # prove the saving on your own repo
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
</details>
|
|
295
|
+
|
|
296
|
+
<details>
|
|
297
|
+
<summary><strong>v1.5.0 — active pentesting (Strix-class) · PR review gate · fix verification · deploy gate</strong></summary>
|
|
298
|
+
|
|
299
|
+
- 🎯 **`vibeguard pentest <url>` — active web/API security testing** (Strix.ai-class "autonomous pentesting", 100% local, zero deps, deterministic). ~20 probe families: security headers (incl. HSTS max-age + CSP unsafe-inline), CORS reflection/null/wildcard, open redirect (multi-payload), exposed files (`.env`, `.git`, backups, swagger, actuator — 404-baseline FP-guarded), GraphQL introspection, verbose errors (2+ stack markers), rate limiting (auth endpoints), JWT **alg:none + weak-HMAC** (opt-in `--token`), TLS version/cert, cookie flags. **Every finding ships severity + CWE + evidence + a copy-paste curl reproduction.**
|
|
300
|
+
- 📡 **`--verify-ssrf` — out-of-band SSRF proof-of-exploit**: a local callback listener + form/param fuzzing; if the target fetches the listener URL, that IS proof (Strix's "proof for every finding", done deterministically and offline). Live demo: `CRITICAL web.ssrf-proof — callback observed, parameter: url`.
|
|
301
|
+
- 🔀 **`vibeguard pr-scan` — PR review gate with Strix-compatible exit codes** (0 clean / 2 findings / 1 fatal): reviews ONLY the added lines of a diff (working tree, `--staged`, or `--base origin/main`), taint-correct (full file analyzed, findings filtered to changed lines). Sub-second on real diffs vs Strix's minutes.
|
|
302
|
+
- ✅ **`vibeguard fix --apply --verify` — the "fix verified" loop**: applies the snapshot-backed auto-fixes, re-scans, and reports ✓/⚠ per finding (Strix's headline workflow, deterministic).
|
|
303
|
+
- 🚦 **`vibeguard pre-deploy --pentest-url <url>`** — 14th gate: live pentest runs inside the deploy gate; critical/high findings block the deploy.
|
|
304
|
+
- ⚔️ **vs Strix.ai (their own numbers):** their deep scan costs ~$1.7–3.9/run in LLM tokens, takes 30 min–4 h, is non-deterministic, and needs Docker+Kali+an API key. VibeGuard: zero cost, ~1.6 s for the demo run, identical input → identical output, no Docker, no keys — plus runtime AI-agent protection and git-history scanning Strix doesn't have.
|
|
305
|
+
- 🧪 **497 tests, 0 failures** · **861 rules** · **93 MCP tools** · Grade A self-scan on 291 files.
|
|
306
|
+
|
|
307
|
+
</details>
|
|
308
|
+
|
|
51
309
|
---
|
|
52
310
|
|
|
53
311
|
## 🤔 Why VibeGuard
|
|
@@ -85,9 +343,9 @@ VibeGuard security scan
|
|
|
85
343
|
npx @yagyeshvyas/vibeguard scan
|
|
86
344
|
```
|
|
87
345
|
|
|
88
|
-
**One-command
|
|
346
|
+
**One-command layered protection** (daemon + hooks + shell guard + proxy):
|
|
89
347
|
```bash
|
|
90
|
-
npx @yagyeshvyas/vibeguard auto # 🟢
|
|
348
|
+
npx @yagyeshvyas/vibeguard auto # 🟢 layered protection on
|
|
91
349
|
npx @yagyeshvyas/vibeguard auto --stop # 🔴 turn it off
|
|
92
350
|
```
|
|
93
351
|
|
|
@@ -101,7 +359,7 @@ claude mcp add vibeguard -- npx @yagyeshvyas/vibeguard mcp
|
|
|
101
359
|
{ "mcpServers": { "vibeguard": { "command": "npx", "args": ["@yagyeshvyas/vibeguard", "mcp"] } } }
|
|
102
360
|
```
|
|
103
361
|
|
|
104
|
-
**
|
|
362
|
+
**16 AI clients supported** — Claude Code, Cursor, Windsurf, Codex CLI, Antigravity, Continue, Cline, Aider, Gemini CLI, Roo Code, OpenHands, VS Code, Copilot CLI, Amazon Q, Sourcegraph Cody, **Hermes Agent** (Nous Research). Install: `vibeguard install`.
|
|
105
363
|
|
|
106
364
|
---
|
|
107
365
|
|
|
@@ -148,7 +406,7 @@ Detects uncapped agent loops — infinite API spend, resource exhaustion.
|
|
|
148
406
|
const completion = await openai.chat.completions.create({...});
|
|
149
407
|
exec(completion.choices[0].message.content); // RCE
|
|
150
408
|
```
|
|
151
|
-
|
|
409
|
+
Detects LLM output reaching `exec`, `eval`, SQL queries, and DOM sinks — an AI-specific pattern that general-purpose SAST tools typically don't cover.
|
|
152
410
|
|
|
153
411
|
### 🪤 Poisoned or rug-pulled MCP server
|
|
154
412
|
```json
|
|
@@ -157,11 +415,11 @@ exec(completion.choices[0].message.content); // RCE
|
|
|
157
415
|
```bash
|
|
158
416
|
vibeguard mcp-audit # audit every MCP server your agent trusts
|
|
159
417
|
```
|
|
160
|
-
Flags tool poisoning (prompt injection in tool descriptions), unpinned auto-install (`npx -y` — the server's code can silently change between runs), remote-code commands, secrets in `env`, and **definition drift** — a server whose config changed since you approved it (the classic MCP rug-pull).
|
|
418
|
+
Flags tool poisoning (prompt injection in tool descriptions), unpinned auto-install (`npx -y` — the server's code can silently change between runs), remote-code commands, secrets in `env`, and **definition drift** — a server whose config changed since you approved it (the classic MCP rug-pull). offline; reads config only, never runs a server.
|
|
161
419
|
|
|
162
420
|
---
|
|
163
421
|
|
|
164
|
-
## 🧠 Agent Action Firewall —
|
|
422
|
+
## 🧠 Agent Action Firewall — exfiltration guard
|
|
165
423
|
|
|
166
424
|
Real-time guard over what an AI agent *does*. Inspect any action **before it runs** and block secrets or personal data from leaving the machine.
|
|
167
425
|
|
|
@@ -178,7 +436,7 @@ inspectAction({ type: 'network', url: 'https://evil.example', body: { key: proce
|
|
|
178
436
|
// { action: 'block', reason: 'Stripe secret key would be sent to evil.example' }
|
|
179
437
|
```
|
|
180
438
|
|
|
181
|
-
The rule is simple
|
|
439
|
+
The rule is simple: **an API key or personal data (email, SSN, credit card, phone) should not leave to an external host** — secrets are blocked unconditionally, PII is blocked (or `warn`), sending to `localhost`/your own allowlisted hosts is fine. Also blocks cloud-metadata credential theft (`169.254.169.254`), secrets written to web-served paths, and secrets pasted into LLM prompts. `sanitizeOutbound()` redacts instead of dropping when you'd rather scrub than block. This catches the common exfil paths (fetch, http, exec, fs) — it is a guard, not a hard sandbox. A determined attacker with arbitrary native code execution can bypass it.
|
|
182
440
|
|
|
183
441
|
---
|
|
184
442
|
|
|
@@ -244,7 +502,7 @@ Aggregates MCP-server trust, PII/secret leakage to LLM providers, LLM output rea
|
|
|
244
502
|
|
|
245
503
|
---
|
|
246
504
|
|
|
247
|
-
## 🤖 `vibeguard auto` — One Command
|
|
505
|
+
## 🤖 `vibeguard auto` — One Command Layered Protection
|
|
248
506
|
|
|
249
507
|
```bash
|
|
250
508
|
vibeguard auto # activates everything
|
|
@@ -385,7 +643,7 @@ Detection depth across languages:
|
|
|
385
643
|
| 🦀 Rust / Kotlin / Swift | Full | Pattern-only | regex |
|
|
386
644
|
| 🔧 C / C++ / Dart / Scala / Elixir | Full | Pattern-only | regex |
|
|
387
645
|
|
|
388
|
-
**18 languages
|
|
646
|
+
**18 languages** = secret/pattern detection across all 18. AST taint analysis is JS/TS only (via acorn); Python uses a multi-pass scope-aware engine; the other 15 languages are pattern-based. The table below shows exactly what depth each language gets.
|
|
389
647
|
|
|
390
648
|
**Engine modes.** Full precision needs the optional `acorn` parser. Without it VibeGuard runs `regex-only` and says so loudly:
|
|
391
649
|
|
|
@@ -401,7 +659,9 @@ Install precision: `npm i -D acorn acorn-walk acorn-typescript`.
|
|
|
401
659
|
|
|
402
660
|
## 📈 Benchmark
|
|
403
661
|
|
|
404
|
-
Measured against a curated corpus of
|
|
662
|
+
Measured against a curated corpus of **136 files (97 vuln + 39 clean)**. VibeGuard also dogfoods itself — `vibeguard scan .` on this repo returns **Grade A**, 0 findings across 309 files.
|
|
663
|
+
|
|
664
|
+
> **Read the 100% honestly.** It does **not** mean the scanner is perfect — it means *this corpus no longer discriminates*. v1.7 added 8 laundered-source cases (destructuring, reassignment chains, optional chaining, helper accessors, `sh -c`) and 8 adversarial clean cases (`parseInt`, `db.escape`, allowlist ternaries, parameterized queries, `spawn` arg arrays, sanitizing helpers) specifically to make it harder, and the engine handled all of them. The corpus is self-built, so it flatters the tool by construction. Treat it as a regression gate, not a ranking.
|
|
405
665
|
|
|
406
666
|
<!-- BENCHMARK:START -->
|
|
407
667
|
<!-- Auto-generated by `npm run benchmark` — do not edit manually -->
|
|
@@ -410,16 +670,57 @@ Measured against a curated corpus of 121 files (90 vuln + 31 clean). Not a vanit
|
|
|
410
670
|
|
|
411
671
|
| Category | TP | FP | FN | Precision | Recall | F1 |
|
|
412
672
|
|----------|----|----|----|-----------|--------|----|
|
|
413
|
-
| injection |
|
|
414
|
-
| secrets |
|
|
415
|
-
| xss |
|
|
416
|
-
| path-traversal |
|
|
417
|
-
| ai-safety | 15 |
|
|
418
|
-
| **OVERALL** | **
|
|
673
|
+
| injection | 57 | 0 | 0 | 100.0% | 100.0% | 100.0% |
|
|
674
|
+
| secrets | 20 | 0 | 0 | 100.0% | 100.0% | 100.0% |
|
|
675
|
+
| xss | 17 | 0 | 0 | 100.0% | 100.0% | 100.0% |
|
|
676
|
+
| path-traversal | 10 | 0 | 0 | 100.0% | 100.0% | 100.0% |
|
|
677
|
+
| ai-safety | 15 | 0 | 0 | 100.0% | 100.0% | 100.0% |
|
|
678
|
+
| **OVERALL** | **119** | **0** | **0** | **100.0%** | **100.0%** | **100.0%** |
|
|
679
|
+
|
|
680
|
+
_Per-category verdicts and full case list in [test/benchmark/benchmark-results.md](test/benchmark/benchmark-results.md)._
|
|
681
|
+
|
|
682
|
+
✅ **119 / 119 cases**, 0 false positives, 0 false negatives — on a corpus deliberately hardened in v1.7. Previous release: 96.0% F1 (4 FP, 5 FN).
|
|
419
683
|
|
|
420
684
|
<!-- BENCHMARK:END -->
|
|
421
685
|
|
|
422
|
-
Run `npm run benchmark` to reproduce. Per-category breakdown in `test/benchmark/benchmark-results.md`.
|
|
686
|
+
Run `npm run benchmark` to reproduce. Per-category breakdown in `test/benchmark/benchmark-results.md`. The scorer runs the same de-duplication the product does, so it measures what a user actually sees rather than raw pre-dedupe rule hits. Still a self-built corpus — plans to run against OWASP Benchmark and publish those numbers alongside.
|
|
687
|
+
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
## 🏆 Why VibeGuard wins vs. every other AI-era scanner
|
|
691
|
+
|
|
692
|
+
A direct, no-marketing comparison across the tools people actually reach for:
|
|
693
|
+
|
|
694
|
+
| Capability | VibeGuard | Semgrep | Gitleaks | Trivy | Snyk | npm audit | GitHub Secret Scanning |
|
|
695
|
+
|---|---|---|---|---|---|---|---|
|
|
696
|
+
| **Offline by default** (explicit network commands) | ✅ | ⚠️ local mode only | ✅ | ✅ | ❌ cloud | ✅ | ❌ |
|
|
697
|
+
| **No account / no signup** | ✅ | ⚠️ some rules need auth | ✅ | ✅ | ❌ | ✅ | ✅ |
|
|
698
|
+
| **Free for commercial use, forever** | ✅ MIT | ⚠️ paid for full rules | ✅ Apache-2.0 | ✅ Apache-2.0 | ⚠️ freemium | ✅ | ✅ |
|
|
699
|
+
| **AI-specific detection** (prompt injection, agent loops, LLM→exec sinks, MCP poisoning) | ✅ 100+ AI rules | ❌ | ❌ | ❌ | ⚠️ small subset | ❌ | ❌ |
|
|
700
|
+
| **Agent-era runtime guard** (exfil block, `vibeguard guard-action`) | ✅ | ❌ | ❌ | ❌ | ⚠️ via cloud | ❌ | ❌ |
|
|
701
|
+
| **Local MITM proxy** for polyglot (Go/Python/Ruby) exfil trapping | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
702
|
+
| **MCP server audit + tool-poisoning detection** (+ rug-pull diff) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
703
|
+
| **AST taint (JS/TS)** vs line-regex | ✅ cross-file | ✅ stronger | ❌ | ❌ | ✅ | ❌ | ❌ |
|
|
704
|
+
| **SBOM + dependency-drift diff** (`vibeguard sbom-diff`) | ✅ | ❌ | ❌ | ✅ image-level | ✅ | ⚠️ npm only | ❌ |
|
|
705
|
+
| **Self-healing autofix** (safe mechanical fixes, no LLM) | ✅ 43 types | ❌ | ❌ | ❌ | ⚠️ some | ❌ | ❌ |
|
|
706
|
+
| **Pre-commit / post-edit hook + daemon auto-scan** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
707
|
+
| **SARIF + GitHub Code Scanning integration** | ✅ | ✅ | ❌ | ✅ | ✅ | ⚠️ | ✅ |
|
|
708
|
+
| **60+ CI providers + one-command setup** | ✅ 7 templates | ✅ | ⚠️ manual | ✅ | ✅ | ✅ | ✅ |
|
|
709
|
+
| **Token-lean agent output** (`--lean`, budgets, delta) | ✅ **91% fewer tokens** | ❌ raw JSON | ❌ raw JSON | ❌ raw JSON | ❌ raw JSON | ❌ raw JSON | ❌ |
|
|
710
|
+
| **Hard token budget per tool call** (risk-ranked, discloses what it cut) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
711
|
+
| **No LLM needed for detection** (deterministic) | ✅ | ❌ ML not default | ✅ | ✅ | ⚠️ mixed | ✅ | ✅ |
|
|
712
|
+
| **Ease: one command → grade A–F** | ✅ `vibeguard scan` | ⚠️ rules packs + tuning | ⚠️ flags | ⚠️ flags | ⚠️ signup-first | ⚠️ exit-code only | ⚠️ repo-side |
|
|
713
|
+
|
|
714
|
+
**What each genuinely still does better** (honesty check): Gitleaks has broader secret-type coverage, Semgrep has deeper 30+ language taint, Trivy has container-image scanning and a bigger vulnerability database. VibeGuard doesn't try to beat them there — it catches the risks they structurally **miss**: leaked keys inside AI coding tools, agent loops, prompt injection, MCP server rug-pulls, local exfil to arbitrary hosts, and AI-runtime behavior that no standard scanner guards.
|
|
715
|
+
|
|
716
|
+
**Differentiators that aren't on anyone else's free tier**:
|
|
717
|
+
- 🪝 **Post-edit hook block** — install once and the hook runs every time an AI client writes a file, blocking commits the instant a secret lands.
|
|
718
|
+
- 🤖 **Agent-grade posture in one grade** (`vibeguard agent-scan`) — scored C/F for MCP trust, PII leakage, LLM output sinks, and agent loops in one pass.
|
|
719
|
+
- 🧠 **AI Firewall** — Layer 1 (regex threat patterns) + Layer 2 (token-feature semantic classifier) blocks injection *before* the LLM call, no API key needed.
|
|
720
|
+
- 🔐 **Agent action guard** — every shell command / network request / file write / LLM prompt checked against an exfiltration policy before it runs.
|
|
721
|
+
- 🪶 **Token-lean agent protocol (TLAP)** — the only scanner that treats your agent's context window as a budget. Every other tool hands an agent pretty-printed JSON that repeats the same `message` and `fix` string once per occurrence; VibeGuard states each rule once, dictionary-codes directory prefixes, and spends a hard token budget on the highest-risk findings first. Reproduce the number on your own repo with `vibeguard tokens`.
|
|
722
|
+
|
|
723
|
+
Use VibeGuard *alongside* Gitleaks and Trivy — not instead. The niche is AI-era risks, and there it has no direct free+offline competitor today.
|
|
423
724
|
|
|
424
725
|
---
|
|
425
726
|
|
|
@@ -432,12 +733,19 @@ vibeguard scan --fix # scan + apply safe auto-fixes
|
|
|
432
733
|
vibeguard scan --all # show all findings including low-confidence
|
|
433
734
|
vibeguard scan --patch # output unified diff for fixes
|
|
434
735
|
vibeguard scan --output sarif # SARIF output for GitHub Code Scanning
|
|
736
|
+
vibeguard scan --lean # token-lean output for AI agents (~91% fewer tokens)
|
|
737
|
+
vibeguard scan --lean --budget N # cap the payload at N tokens, highest-risk first
|
|
738
|
+
vibeguard scan --lean --delta # only what changed since the last scan
|
|
739
|
+
vibeguard tokens [dir] # measure the token saving on your own repo
|
|
435
740
|
vibeguard agent-scan [dir] # AI agent security posture grade
|
|
741
|
+
vibeguard attack-surface [dir] # entrypoints × auth × reachability: what is exposed now
|
|
742
|
+
vibeguard attack-surface --lean # same map as a compact agent payload
|
|
743
|
+
vibeguard bundle-scan # secrets inlined in dist/build/.next artifacts
|
|
436
744
|
vibeguard mcp-audit # audit MCP servers for poisoning/drift
|
|
437
745
|
vibeguard pre-deploy [dir] # 13-gate deployment check
|
|
438
746
|
|
|
439
747
|
# 🛡️ Protection
|
|
440
|
-
vibeguard auto [dir] #
|
|
748
|
+
vibeguard auto [dir] # layered protection (daemon + hooks + shell guard + proxy)
|
|
441
749
|
vibeguard auto --stop # turn off, restore backups
|
|
442
750
|
vibeguard guard-action "cmd" # inspect an agent action before running
|
|
443
751
|
vibeguard guard "command" # check a shell command before running it
|
|
@@ -448,14 +756,20 @@ vibeguard url <url> # scan HTTP headers for security misconfig
|
|
|
448
756
|
vibeguard sbom [dir] # CycloneDX 1.5 SBOM
|
|
449
757
|
vibeguard reachability [dir] # CVE vs actual import graph
|
|
450
758
|
vibeguard container-scan <image> # trivy container scan
|
|
451
|
-
vibeguard license [dir]
|
|
759
|
+
vibeguard license [dir] License allowlist check
|
|
760
|
+
vibeguard sbom-diff <base> <head> Dependency drift between two snapshots
|
|
761
|
+
vibeguard gif <query> Keyless open GIF (no API key) — cat/yes/text
|
|
762
|
+
vibeguard pentest <url> Active web/API probe suite (Strix-class) — headers, CORS,
|
|
763
|
+
redirects, exposed files, GraphQL, JWT, SSRF proof, TLS
|
|
764
|
+
vibeguard pr-scan [dir] PR review gate — added-lines only (exit 0/2/1)
|
|
765
|
+
vibeguard fix <dir> --apply --verify Auto-fix + re-scan verification loop
|
|
452
766
|
vibeguard proxy-start # local MITM proxy
|
|
453
767
|
vibeguard proxy-status # proxy status + audit log
|
|
454
768
|
vibeguard proxy-stop # stop proxy
|
|
455
769
|
|
|
456
770
|
# 🔌 Integration
|
|
457
771
|
vibeguard mcp # MCP server (for AI client integration)
|
|
458
|
-
vibeguard install # wire into
|
|
772
|
+
vibeguard install # wire into 16 AI clients
|
|
459
773
|
vibeguard install-hook # git pre-commit hook
|
|
460
774
|
vibeguard install-hook-post # PostToolUse hook (auto-scan AI edits)
|
|
461
775
|
vibeguard init-ci # generate CI/CD workflow files
|
|
@@ -481,6 +795,7 @@ VibeGuard runs entirely on your machine. **No telemetry, no analytics, no networ
|
|
|
481
795
|
| `scan`, `fix`, `auto`, `mcp`, `install`, `proxy` | Never |
|
|
482
796
|
| `cve` (package name lookup) | Opt-in, OSV.dev only |
|
|
483
797
|
| `url` (header scan) | Opt-in, URL you provide |
|
|
798
|
+
| `scan --verify-keys` | Opt-in, sends found keys to their provider (e.g. Stripe key → api.stripe.com) to check if live. Skip this flag in strict environments. |
|
|
484
799
|
|
|
485
800
|
The runtime interceptor and local proxy add guardrails that make data exfiltration significantly harder — they wrap `fetch`, `http.request`, `child_process.exec`, and `fs.readFileSync`, plus the proxy catches polyglot traffic at the network layer.
|
|
486
801
|
|
|
@@ -495,7 +810,7 @@ VibeGuard catches the mechanical security holes that AI coding tools leave behin
|
|
|
495
810
|
- Judge business logic flaws
|
|
496
811
|
- Replace a real security review for anything touching money, auth, or personal data
|
|
497
812
|
|
|
498
|
-
It raises the floor fast — catching the holes that AI tools create by default. The benchmark
|
|
813
|
+
It raises the floor fast — catching the holes that AI tools create by default. The benchmark above is saturated (119/119), which means **the corpus stopped being the hard part — not that the scanner is complete.** It still only checks high-frequency, well-defined issues, and it cannot prove an app is safe.
|
|
499
814
|
|
|
500
815
|
### Honest limits (so the claims stay true)
|
|
501
816
|
|
|
@@ -524,7 +839,7 @@ Templates included for **7 CI providers**: GitHub Actions, GitLab CI, Jenkins, C
|
|
|
524
839
|
|
|
525
840
|
```bash
|
|
526
841
|
npm install
|
|
527
|
-
npm test #
|
|
842
|
+
npm test # 429 tests, 0 failures
|
|
528
843
|
npm run benchmark # precision/recall/F1
|
|
529
844
|
npm run counts # verify rule/tool counts match source
|
|
530
845
|
npm run lint # 0 errors
|
|
@@ -554,4 +869,13 @@ Found a bug? [🐛 Open an issue](https://github.com/yagyeshVyas/VibeGuard/issue
|
|
|
554
869
|
|
|
555
870
|
<sub>© 2026 Yagyesh Vyas. Released under the MIT License.</sub>
|
|
556
871
|
|
|
872
|
+
<br/>
|
|
873
|
+
|
|
874
|
+
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:3B82F6,100:22C55E&height=90§ion=footer" width="100%" alt="VibeGuard" />
|
|
875
|
+
|
|
557
876
|
</div>
|
|
877
|
+
|
|
878
|
+
<!-- COUNTS:START -->
|
|
879
|
+
<!-- Auto-generated by scripts/counts.js — do not edit manually -->
|
|
880
|
+
<!-- Rules: 861 | MCP Tools: 93 | Defense Layers: 13 -->
|
|
881
|
+
<!-- COUNTS:END -->
|