@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.
Files changed (167) hide show
  1. package/.vibeguard-mcp.example.json +51 -0
  2. package/CHANGELOG.md +604 -216
  3. package/MCP-FIREWALL.md +296 -0
  4. package/README.md +355 -31
  5. package/bin/cli.js +355 -27
  6. package/bin/cmd-agent-monitor.js +45 -0
  7. package/bin/cmd-agent-risk.js +64 -0
  8. package/bin/cmd-gif.js +62 -0
  9. package/bin/cmd-git-scan.js +74 -0
  10. package/bin/cmd-llm-proxy.js +164 -0
  11. package/bin/cmd-mcp-firewall.js +191 -0
  12. package/bin/cmd-pentest.js +103 -0
  13. package/bin/cmd-platform.js +137 -0
  14. package/bin/cmd-pr-scan.js +135 -0
  15. package/bin/cmd-sbom-diff.js +38 -0
  16. package/bin/cmd-skill-scan.js +35 -0
  17. package/docs/AISVS.md +25 -0
  18. package/docs/ARCHITECTURE.md +81 -0
  19. package/docs/INSTALLATION.md +139 -0
  20. package/docs/WINDOWS.md +74 -0
  21. package/docs/security-policy.strict.example.json +134 -0
  22. package/docs/security-policy.strict.example.pub.pem +3 -0
  23. package/package.json +45 -7
  24. package/src/.vibeguard/cache/file-hashes.json +60 -0
  25. package/src/.vibeguard/latest-snapshot.json +36 -0
  26. package/src/.vibeguard/mcp-pins.json +1 -0
  27. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/auto.js +428 -0
  28. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/daemon.js +344 -0
  29. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/dashboard.js +279 -0
  30. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/engine.js +297 -0
  31. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/hook.js +151 -0
  32. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/install.js +299 -0
  33. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/manifest.json +65 -0
  34. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/mcp-server.js +2051 -0
  35. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/plugin.js +168 -0
  36. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/pre-deploy.js +362 -0
  37. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/repl.js +150 -0
  38. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/rules.js +1611 -0
  39. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/sbom.js +164 -0
  40. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/shell-guard.js +292 -0
  41. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/slopsquat.js +144 -0
  42. package/src/.vibeguard/snapshots/2026-08-05T16-23-50-635Z/trace.js +220 -0
  43. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/auto.js +428 -0
  44. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/daemon.js +344 -0
  45. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/engine.js +297 -0
  46. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/install.js +299 -0
  47. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/manifest.json +37 -0
  48. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/mcp-server.js +2055 -0
  49. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/plugin.js +168 -0
  50. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/pre-deploy.js +362 -0
  51. package/src/.vibeguard/snapshots/2026-08-05T16-26-26-074Z/trace.js +220 -0
  52. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/auto.js +428 -0
  53. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/daemon.js +344 -0
  54. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/dashboard.js +279 -0
  55. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/engine.js +297 -0
  56. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/hook.js +151 -0
  57. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/install.js +299 -0
  58. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/manifest.json +65 -0
  59. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/mcp-server.js +2055 -0
  60. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/plugin.js +168 -0
  61. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/pre-deploy.js +362 -0
  62. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/repl.js +150 -0
  63. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/rules.js +1611 -0
  64. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/sbom.js +164 -0
  65. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/shell-guard.js +292 -0
  66. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/slopsquat.js +144 -0
  67. package/src/.vibeguard/snapshots/2026-08-05T16-35-06-272Z/trace.js +220 -0
  68. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/auto.js +428 -0
  69. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/daemon.js +344 -0
  70. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/dashboard.js +279 -0
  71. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/engine.js +297 -0
  72. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/hook.js +151 -0
  73. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/install.js +299 -0
  74. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/manifest.json +65 -0
  75. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/mcp-server.js +2054 -0
  76. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/plugin.js +168 -0
  77. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/pre-deploy.js +362 -0
  78. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/repl.js +150 -0
  79. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/rules.js +1611 -0
  80. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/sbom.js +164 -0
  81. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/shell-guard.js +292 -0
  82. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/slopsquat.js +144 -0
  83. package/src/.vibeguard/snapshots/2026-08-05T18-08-40-613Z/trace.js +220 -0
  84. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/auto.js +428 -0
  85. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/daemon.js +344 -0
  86. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/engine.js +297 -0
  87. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/install.js +299 -0
  88. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/manifest.json +37 -0
  89. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/mcp-server.js +2055 -0
  90. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/plugin.js +168 -0
  91. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/pre-deploy.js +362 -0
  92. package/src/.vibeguard/snapshots/2026-08-05T18-11-32-644Z/trace.js +220 -0
  93. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/auto.js +428 -0
  94. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/daemon.js +344 -0
  95. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/engine.js +297 -0
  96. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/manifest.json +33 -0
  97. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/mcp-server.js +2055 -0
  98. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/rules.js +1611 -0
  99. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/shell-guard.js +292 -0
  100. package/src/.vibeguard/snapshots/2026-08-05T18-16-47-635Z/trace.js +220 -0
  101. package/src/.vibeguard-baseline.json +5226 -0
  102. package/src/action-guard.js +84 -6
  103. package/src/agent-monitor.js +262 -0
  104. package/src/agent-policy.js +642 -0
  105. package/src/agent-risk.js +271 -0
  106. package/src/agentic.js +1513 -0
  107. package/src/ast.js +165 -7
  108. package/src/audit-trail.js +212 -67
  109. package/src/auto.js +427 -427
  110. package/src/autofix.js +11 -4
  111. package/src/bundles.js +198 -0
  112. package/src/daemon.js +343 -343
  113. package/src/dashboard.js +278 -278
  114. package/src/engine.js +3 -0
  115. package/src/entropy.js +187 -0
  116. package/src/firewall.js +19 -3
  117. package/src/gif.js +134 -0
  118. package/src/gitscan.js +282 -0
  119. package/src/hook.js +151 -151
  120. package/src/injection-decode.js +136 -0
  121. package/src/install.js +298 -280
  122. package/src/integrity.js +16 -1
  123. package/src/integrity.json +43 -13
  124. package/src/interceptor.js +12 -9
  125. package/src/llm-proxy.js +986 -0
  126. package/src/mcp-audit.js +61 -5
  127. package/src/mcp-firewall.js +971 -0
  128. package/src/mcp-server.js +2500 -2047
  129. package/src/obfuscation.js +315 -0
  130. package/src/owasp-agentic.js +314 -0
  131. package/src/pentest.js +589 -0
  132. package/src/pii.js +4 -0
  133. package/src/platform/aisvs.js +38 -0
  134. package/src/platform/approval.js +187 -0
  135. package/src/platform/canonical.js +73 -0
  136. package/src/platform/contracts.js +158 -0
  137. package/src/platform/delegation.js +73 -0
  138. package/src/platform/http-gateway.js +177 -0
  139. package/src/platform/identity.js +253 -0
  140. package/src/platform/jwt.js +86 -0
  141. package/src/platform/mcp-http-bridge.js +199 -0
  142. package/src/platform/memory-guard.js +64 -0
  143. package/src/platform/os-sandbox.js +144 -0
  144. package/src/platform/policy.js +332 -0
  145. package/src/platform/sandbox-manager.js +92 -0
  146. package/src/platform/signed-audit.js +357 -0
  147. package/src/platform/ssrf.js +129 -0
  148. package/src/plugin.js +182 -168
  149. package/src/pre-deploy.js +170 -55
  150. package/src/privacy-audit.js +272 -272
  151. package/src/repl.js +150 -150
  152. package/src/report.js +7 -1
  153. package/src/routes.js +1210 -0
  154. package/src/rules-2026.js +1407 -0
  155. package/src/rules-pack.js +3068 -3019
  156. package/src/rules.js +376 -60
  157. package/src/sandbox.js +200 -10
  158. package/src/sbom.js +193 -164
  159. package/src/scanner.js +189 -33
  160. package/src/shell-guard.js +11 -0
  161. package/src/skill-scan.js +477 -0
  162. package/src/slopsquat.js +144 -144
  163. package/src/surface.js +408 -0
  164. package/src/taint-ast.js +204 -37
  165. package/src/taint.js +15 -3
  166. package/src/tokenlean.js +579 -0
  167. package/src/trace.js +220 -220
package/CHANGELOG.md CHANGED
@@ -1,216 +1,604 @@
1
- # Changelog
2
-
3
- All notable changes to VibeGuard are documented here.
4
- Format based on [Keep a Changelog](https://keepachangelog.com/).
5
-
6
- ## [Unreleased]
7
-
8
- ### Added — Phase 1: Compliance + MCP Tools + Breadth
9
- - 4 new MCP tools (82 total): `generate_sbom`, `dep_reachability`,
10
- `scan_container_image`, `license_compliance`.
11
- - `vibeguard sbom [dir]` — CycloneDX 1.5 SBOM from `package-lock.json` +
12
- source import graph. Marks which deps are actually imported in code.
13
- `src/sbom.js`.
14
- - `vibeguard reachability [dir]` — cross-references CVE results against
15
- the actual import graph. Separates reachable vulns (imported — fix first)
16
- from transitive-only (lower priority).
17
- - `vibeguard container-scan <image>` — shells out to `trivy` for container
18
- image vulnerability scanning. Graceful fallback when trivy absent.
19
- - `vibeguard license [dir]` — checks `package.json` licenses against an
20
- allowlist (MIT/ISC/BSD/Apache/0BSD). `--allow GPL-3.0` adds custom
21
- licenses. Flags GPL/AGPL/unlicensed.
22
- - 4 new compliance frameworks (10 total): NIST CSF 2.0, OWASP ASVS L1/L2/L3,
23
- CIS Controls v8, NIST SP 800-53 Rev. 5. `src/compliance.js`,
24
- `src/rules-pack.js` `COMPLIANCE_MAP`.
25
- - Fixed PCI-DSS from 3.2.1 control IDs to actual v4.0 IDs (6.2.4, 8.3.2, etc.).
26
- - 3 new AI client installers (15 total): Copilot CLI, Amazon Q Developer,
27
- Sourcegraph Cody. `src/install.js`.
28
- - 3 new CI templates (7 total): Bitbucket Pipelines, Travis CI, Buildkite.
29
- `ci-templates/`.
30
-
31
- ### Changed — Phase 0: Honesty Fixes
32
- - `deep_scan` reframed from "LLM-powered deep review" (overclaim) to
33
- "agentic deep review" — emits structured review contracts for the
34
- consuming AI client. VibeGuard never calls an LLM. `src/mcp-server.js`.
35
- - Sandbox `vm` limits documented honestly: Node `vm` is not a security
36
- boundary, memory cap is unenforced. `src/sandbox.js`, `README.md`.
37
- - Stale test floors bumped: 200+ → 500+ rules, 40/54 → 78+ MCP tools.
38
- - README honest-scope expanded: sandbox vm, AI-safety recall 57%, taint
39
- JS/TS-only, VibeGuard never calls LLM.
40
-
41
- ### Added
42
- - Self-integrity verification. `vibeguard self-check` now cryptographically
43
- verifies the CONTENT of its critical security modules (action-guard,
44
- shell-guard, interceptor, firewall, rules, scanner, taint, mcp-audit, …)
45
- against a shipped SHA-256 manifest (`src/integrity.json`), not just that they
46
- load. Detects a patched/neutered guard — e.g. `inspectAction` rewritten to
47
- always allow, or a rule file gutted — which a load-only check missed. Manifest
48
- is regenerated on `prepublishOnly` (and via `npm run integrity`). Honest limit:
49
- detects source tampering, not a full chain of trust; verify npm provenance for
50
- the trust anchor. `src/integrity.js`, `scripts/gen-integrity.js`.
51
- - Agent Action Firewall — `vibeguard guard-action` + `guard_action` MCP tool +
52
- `src/action-guard.js` (`inspectAction`). Real-time "nothing leaks" guard:
53
- inspect any agent action (shell / network / file-write / prompt / MCP call)
54
- BEFORE it runs and block secret or personal-data exfiltration. Hard rule — an
55
- API key or PII (email, SSN, credit card, phone) never leaves to an external
56
- host: secrets blocked unconditionally, PII blocked (or warn), local/allowlisted
57
- hosts permitted. Also blocks cloud-metadata credential theft, secrets written
58
- to web-served paths, and secrets in LLM prompts. `sanitizeOutbound()` redacts
59
- instead of dropping. 100% offline, fail-closed on the block path. A guard, not
60
- a sandbox.
61
- - `vibeguard agent-scan` — AI Agent Security Posture (new `agent_scan` MCP tool
62
- too). One graded verdict — "is my AI-agent setup safe?" — aggregating every
63
- agent-era check into threat categories: MCP-server trust, PII/secret leakage
64
- to LLM providers, LLM output reaching exec/eval/SQL/DOM, prompt injection,
65
- agent capability/loop safety, and hallucinated dependencies. Pure offline
66
- orchestration of already-tested modules (mcp-audit + ai-guard + the `ai.*`
67
- rule family). `--fail-on <level>` to gate CI.
68
- - `vibeguard mcp-audit` — MCP server security audit (new `mcp_audit` MCP tool
69
- too). Audits the MCP servers an agent is configured to trust
70
- (`.mcp.json` / `.cursor/mcp.json` / `.vscode/mcp.json`) for tool poisoning
71
- (prompt injection in server args/descriptions), unpinned auto-install
72
- (`npx -y` rug-pull surface), remote-code / shell commands, hardcoded secrets
73
- in `env`, over-broad filesystem grants, and **definition drift** — a server
74
- whose config changed since you approved it (classic MCP rug-pull). 100%
75
- offline: reads config only, never runs a server. Pins server-definition
76
- hashes under `.vibeguard/mcp-pins.json`; `--pin` re-baselines after review.
77
- - `vibeguard scan --staged` — scan only git-staged files. Ideal for a
78
- pre-commit hook: fast and scoped to exactly what's being committed. Per-file
79
- only (cross-file analysis skipped, and the CLI says so).
80
- - `vibeguard scan --no-suppress` — CI trust mode. Ignores inline
81
- `vibeguard-ignore` comments and the heuristic false-positive filter so a
82
- careless or hostile inline comment in a PR cannot silence a gate. Deliberate
83
- project config (ignoreRules/ignorePaths) is still honored.
84
- - Fail-loud coverage tracking. Every analysis pass (taint, python-taint, AST,
85
- file-rules) that errors is now recorded instead of silently swallowed. Scan
86
- results carry `engine` (`ast` | `regex-only`) and `diagnostics`
87
- (degraded passes, parse-failed files, degraded file count). The CLI prints a
88
- loud banner when running `regex-only` (acorn missing) or when any file was
89
- only partially analyzed — a degraded scan no longer masquerades as clean.
90
- - `vibeguard scan --strict` — exit code 3 when any file scanned degraded, so CI
91
- never trusts an incomplete result. **Note:** existing CI configs that add
92
- `--strict` will now hard-fail on degraded scans (intended).
93
- - Benchmark quality gate: `node test/benchmark/run.js --gate` fails (exit 2) if
94
- overall precision/recall/F1 regress below a floor (P≥80% / R≥78% / F1≥80%;
95
- override via `VIBEGUARD_BENCH_MIN_*`). Wired into CI so detection quality
96
- regressions block merges.
97
- - ReDoS / pathological-input regression tests + coverage-transparency tests.
98
- - Engine mode + degraded-coverage now surfaced in JSON output and the MCP
99
- `scan` tool (payload + summary) so agents don't treat a degraded scan as an
100
- all-clear.
101
- - `VIBEGUARD_NO_POSTINSTALL=1` (and CI auto-detect) to silence the install
102
- message.
103
- - README `Coverage & Limits` section: honest per-language detection-depth
104
- matrix, engine-mode explainer, fail-loud explainer, and an explicit "the
105
- shell guard is a mistake-catcher, not a sandbox" statement.
106
- - `vibeguard auto` — one-command full autonomous protection. Activates
107
- daemon (file watcher), pre-commit hook, post-edit hook, and shell guard.
108
- Idempotent. `--stop` reverses everything and restores backups. `--status`
109
- shows what's active. `--ci` for pipeline mode. `--fix` for safe auto-fixes.
110
- `--no-shell` to skip shell hook. `--strict` to block on HIGH too.
111
- - `src/auto.js` orchestrator composing existing modules (scanner, daemon,
112
- hook, shell-guard). All state under `.vibeguard/auto.json`.
113
- - Shell hook FP fix: default-allow policy. Unknown commands are allowed.
114
- Only block on known dangerous patterns. Fail-open on module load errors.
115
- Both `shell-hook.sh` and `shell-hook.ps1` now try multiple module paths
116
- and never block when VibeGuard can't load.
117
-
118
- ### Performance
119
- - Incremental scanning: `vibeguard scan --changed` only rescans files whose
120
- content changed since the last scan (SHA-256 hash cache under
121
- `.vibeguard/cache`). Warm re-scan of an unchanged tree drops from ~600ms to
122
- ~5ms in local testing (~100×+). Per-file only — cross-file taint/rules are
123
- skipped in this mode and the CLI says so; run a full scan for those. Intended
124
- for pre-commit and watch loops.
125
- - Fixed: the scanner no longer walks its own `.vibeguard/` cache/baseline
126
- artifacts (added to the skip-dirs list).
127
- - Scanner ~50% faster (108ms → 54ms/file on the repo's own source). Three
128
- behavior-preserving changes, verified identical findings + unchanged benchmark
129
- (95 TP / 15 FP / 16 FN):
130
- 1. Memoize the global-flag regex per rule — the hot path was recompiling a
131
- fresh `RegExp` per rule *per line* (~64% of scan time).
132
- 2. Hoist the `fileFilter` check out of the per-line loop (it depends only on
133
- the path) and cache the compiled filter.
134
- 3. Provably-safe literal prefilter: skip a rule when a mandatory literal from
135
- its regex is absent from the line, avoiding the regex entirely. Never
136
- introduces a false negative (bails on alternation, ignores optional/grouped
137
- literals). Guarded by unit tests + a throughput regression test.
138
-
139
- ### Fixed
140
- - Interceptor: wrapped `fs.readFileSync` called itself instead of the saved
141
- original, causing infinite recursion / stack overflow on any uncached file
142
- read after activation. Now calls the original. Regression test added.
143
-
144
- ### Changed
145
- - Agent Action Firewall now blocks UNKNOWN-format secrets, not just known vendor
146
- patterns. An outbound field named like a credential (`apiKey`, `secret`,
147
- `password`, `client_secret`, `private_key`, `access_key`, …) carrying a
148
- high-entropy value is blocked from leaving to an external host — so a custom
149
- API key or session secret that matches no known regex can't exfiltrate either.
150
- Precise by design: the credential NAME plus real entropy avoids false
151
- positives on content hashes, UUIDs, ids, env-var references, and low-entropy
152
- placeholders (all verified). Ambiguous names (token/bearer/session) are
153
- intentionally excluded to avoid breaking legitimate auth traffic.
154
- - Runtime interceptor now delegates to the unified Agent Action Firewall
155
- (`action-guard.inspectAction`). Every wrapped `fetch` / `http` / `exec` /
156
- `execSync` call is checked with the hardened, shared logic — so obfuscated
157
- commands (base64, `$IFS`, variable indirection) and secrets embedded in a
158
- request URL are now blocked at runtime, which the interceptor's old naive
159
- `.includes()` check missed. `CONFIG.allowDomains` are honored as trusted
160
- destinations. Protection is automatic once the interceptor is active — no
161
- per-call `guard_action` needed.
162
- - Python taint analysis rewritten as single-pass taint propagation (still pure
163
- JS — no external parser, keeps VibeGuard zero-dependency and offline). Tracks
164
- tainted variables through intermediate assignments (`q = "..." + data` →
165
- `execute(q)`) and clears taint on clean reassignment. Fixes false positives
166
- where a tainted name merely appeared near an unrelated sink. Parameterized SQL
167
- (`execute("... %s ...", (params,))`) and inline-sanitized sinks
168
- (`eval(int(x))`, `os.system(shlex.quote(x))`) are not flagged; unsafe
169
- concatenation / f-string flows still fire.
170
- - Shell guard normalizer hardened. Now substitutes ALL variable assignments
171
- (previously only the first, a real bypass: `A=rm; B=-rf; $A $B /`), handles
172
- `$IFS` word-splitting and `/usr/bin/rm`, and iterates to a fixpoint so layered
173
- obfuscation unwinds. Still, by design, a mistake-catcher — not a sandbox.
174
- - CI workflow renamed `test.yml` → `ci.yml` to match the README status badge.
175
- - Taint analysis upgraded from regex-only to scope-aware, AST-based dataflow
176
- (`taint-ast.js`). Sources/sinks matched on AST nodes (MemberExpression /
177
- CallExpression), not text. Respects block/function scope with shadowing,
178
- clears taint on clean reassignment, recognizes sanitizers (parseInt,
179
- path.basename, DOMPurify.sanitize, etc. — configurable array). Tracks
180
- cross-function taint within a file via intra-function fixpoint. All
181
- AST-confirmed findings carry `confidence: "high"` and `dataflow: true`.
182
- Regex taint retained as fallback for unparseable files. Finding object
183
- shape unchanged (ruleId/severity/title/message/fix preserved).
184
-
185
- ### Added
186
- - Cross-file taint analysis via import/export graph (`crosstaint.js`)
187
- - Optional AST mode with acorn + acorn-typescript (`ast.js`)
188
- - `vibeguard doctor` — AI host security audit (hook injection, base URL hijack, MCP config)
189
- - `vibeguard history` — git history secret scan
190
- - `vibeguard watch` — re-scan on file change
191
- - `vibeguard rules` / `vibeguard explain` — rule listing and documentation
192
- - Live key verification (`--verify-keys`) for OpenAI + Stripe
193
- - Inline suppressions (`vibeguard-ignore-line` / `vibeguard-ignore-next-line`)
194
- - Project config (`.vibeguardrc.json`) with ignoreRules, ignorePaths, severityOverrides
195
- - .gitignore-aware secret scanning
196
- - Stable finding fingerprints for SARIF + baseline diffing
197
- - External scanner support: semgrep, gitleaks, bandit
198
- - 15 secret types (GitHub, Slack, GitLab, Twilio, SendGrid, Mailgun, Telegram, npm, Resend, connection strings, public-LLM-key)
199
- - AI security rules (browser-api-key, disabled-sandbox, eval-llm-output, prompt-injection-marker)
200
- - Injection rules (prototype pollution, ReDoS, XXE, CRLF)
201
- - Framework rules (Prisma raw, React dangerous HTML, reflected XSS)
202
- - IaC rules (Dockerfile, GitHub Actions, Terraform)
203
- - Package hygiene (unpinned deps, dangerous scripts, no lockfile)
204
- - 63 tests, all passing
205
-
206
- ## [0.1.0] - Initial release
207
- - Core scanner with secrets, injection, auth, config, PII rules
208
- - Fix → verify loop with baseline + rollback
209
- - MCP server (5 tools)
210
- - Live URL scan
211
- - Badge generation
212
- - One-command multi-client installer
213
- - Pre-commit hook
214
- - GitHub Actions CI template
215
- - SARIF 2.1.0 output
216
- - Zero runtime dependencies (scanner)
1
+ # Changelog
2
+
3
+ All notable changes to VibeGuard are documented here.
4
+ Format based on [Keep a Changelog](https://keepachangelog.com/).
5
+
6
+ ## [1.11.1] - 2026-11-22
7
+
8
+ ### Fixed
9
+
10
+ - Installer now pins the exact runtime package version dynamically instead of the
11
+ stale 1.10.0 literal.
12
+
13
+ ## [1.11.0] - 2026-11-22
14
+
15
+ ### Added — v2 security foundation (internal testing)
16
+
17
+ - Strict signed policy v2 engine (`src/platform/policy.js`) with default deny,
18
+ capabilities, realpath path checks, shell egress checks and deep secret
19
+ inspection.
20
+ - Ed25519 VGAT identity tokens and signed single-use approvals.
21
+ - Signed Ed25519 audit events with Merkle checkpoints and a verifier; strict
22
+ MCP gateway writes signed events by default.
23
+ - Offline EdDSA JWT/JWKS validation and SSRF/private-address protection.
24
+ - Authenticated loopback HTTP JSON-RPC + SSE MCP bridge over a stdio upstream.
25
+ - All-method MCP response inspection, size/depth/pending limits, deep secret
26
+ redaction.
27
+ - `--kill-on-block`/`--max-blocks` quarantine kill response.
28
+ - Strict-gateway audit fail-closed behavior.
29
+ - Linux `unshare` network/PID namespace backend + `sandbox verify`.
30
+ - Memory provenance guard and signed delegation graph libraries.
31
+ - Detection corpus runner and AISVS-style readiness mapping/CLI.
32
+ - New CLI: `policy validate/sign`, `audit verify`, `sandbox backends/verify`,
33
+ `aisvs`.
34
+ - 29 platform security tests; Windows/macOS CI platform jobs; dependency
35
+ high/critical audit gate.
36
+ - Windows destructive-command coverage and realpath path handling.
37
+ - Target-controlled scanner plugins disabled by default; explicit
38
+ `--trust-plugins` opt-in.
39
+ - Process/legacy-vm host-object escape fixes; results labeled unverified.
40
+
41
+ ### Changed — security behavior
42
+
43
+ - Scanner plugins are not executed from target repos by default.
44
+ - `sandbox` results expose `isolationClass`/`verified`; process mode is
45
+ explicitly unverified and not an OS boundary.
46
+ - Invalid policy `defaultAction` values fail closed.
47
+ - Installer uses a pinned package/version.
48
+ - Tests: plugin test opts into explicit trust; firewall paraphrase test accepts
49
+ the deep detector finding ID.
50
+
51
+ ### Security limitations
52
+
53
+ Windows/macOS OS isolation, external audit anchoring, authenticated approver
54
+ UI, TLS/OAuth remote deployment, runtime monitor/quarantine, and
55
+ memory/multi-agent runtime enforcement remain incomplete. See
56
+ `research/KNOWN_LIMITATIONS.md` and
57
+ `research/RELEASE_READINESS.md`.
58
+
59
+ ### Added — v1.10: real-time MCP firewall, agent permissions, OWASP coverage
60
+
61
+ - **`vibeguard mcp-firewall`** — a stdio JSON-RPC proxy between an MCP client
62
+ and an MCP server. Tool definitions are scanned for poisoning and hash-pinned;
63
+ `tools/call` requests are enforced against policy before forwarding (blocked
64
+ calls never reach the server); tool results are scrubbed of secrets/PII before
65
+ they reach the model. Modes: proxy by configured server name, ad-hoc command,
66
+ one-call check, offline self-test, audit status, configured-server listing.
67
+ - **`src/agent-policy.js`** — deterministic permission engine: tool
68
+ allow/deny/approval rules, capability classes, project-scoped filesystem
69
+ access, denied credential stores, egress and metadata-host policy, trusted
70
+ hosts, argument-size and per-minute call limits, fail-closed policy errors.
71
+ - **`src/skill-scan.js` / `vibeguard skill-scan`** — scans SKILL.md, AGENTS.md,
72
+ CLAUDE.md, Cursor rules, Claude agents/skills, plugin and marketplace
73
+ manifests and embedded MCP configs for injection, hidden Unicode,
74
+ exfiltration instructions, credential access, destructive commands, remote
75
+ code loaders, obfuscation, permission bypass, self-modification, risky
76
+ packages and secrets.
77
+ - **`src/agent-risk.js` / `vibeguard agent-risk`** — one 0-100 score and A-F
78
+ grade across MCP configuration, skills, runtime decisions, policy scope and
79
+ audit integrity.
80
+ - **`src/owasp-agentic.js` / `vibeguard owasp-coverage`** — maps controls to the
81
+ OWASP Agentic AI Top 10 and OWASP MCP Top 10 (20/20 mapped), with explicit
82
+ enforced/detected/monitored/advisory statuses; optional LLM Top 10.
83
+ - **`src/agent-monitor.js` / `vibeguard agent-monitor`** — runtime report and
84
+ `--watch` tail over the hash-chained firewall audit log, with behavior
85
+ anomalies (trust building, data gathering, slow exfiltration, privilege
86
+ escalation, repeated blocks, tamper).
87
+ - **Audit trail hardened** — correct hash-chain verification (previous
88
+ implementation never failed on a modified entry), JSONL persistence,
89
+ `createLogger(file)`, and tamper detection over long-lived logs.
90
+ - **Sandbox process isolation** — `runInProcess` and
91
+ `vibeguard sandbox --isolation process`: separate Node process, permission
92
+ model, blocked module loads, stripped env, memory cap, hard timeout. `auto`
93
+ chooses it on Node 20+; Node 18 keeps the vm sandbox.
94
+ - **MCP tools** — `mcp_firewall`, `scan_skills`, `agent_risk`,
95
+ `owasp_coverage`, `agent_monitor`; `sandbox_exec` gains `isolation`.
96
+ - **CLI fixes** — crashes in `dep-firewall` and `audit-trail` output paths
97
+ (undefined `Creset`/`C_reset`), `audit-trail export` path argument, and a PII
98
+ detector false positive that read IPv4 addresses as phone numbers.
99
+ - 26 new tests including a live stdio proxy test; docs in `MCP-FIREWALL.md`.
100
+
101
+ ### Added — v1.9: live-code reachability, exploit chains, build-artifact scan
102
+
103
+ - **Reachability-native scans.** The entrypoint graph now runs on every scan and
104
+ annotates findings `direct` / `imported` / `dead`. `--live` drops findings in
105
+ code no route can reach; ordering puts live findings first at equal severity;
106
+ `--reachability-grade` counts dead-code findings one tier lower. Juice Shop
107
+ measured 306 live vs 3,157 dead findings — the noise control competitors sell
108
+ as "reachability", computed offline in ~0.2 s per 1,000 files.
109
+ - **Exploit chains.** `attack-surface` emits `precondition → entrypoint → sink →
110
+ impact` chains with CWE ids: unauthenticated POST → command injection → RCE;
111
+ `/allocations/:userId` → IDOR → cross-user access; SSRF → metadata credential
112
+ theft. Deterministic — no model call, no variance, no bill.
113
+ - **`vibeguard bundle-scan` + `scan_bundle` MCP tool.** Scans `dist/`, `build/`,
114
+ `out/`, `.next/static`, `static/js` for inlined secret formats (reusing all 75
115
+ secret rules), high-entropy tokens, and shipped source maps. Closes the
116
+ documented blind spot: the commit is clean, the artifact leaks.
117
+ - **MCP:** `scan_bundle`; `scan_project` gains `live` and `reachabilityGrade`;
118
+ `attack_surface` returns chains.
119
+ - 564 tests, 0 failures.
120
+
121
+ ### Added — v1.8: attack surface, authorization intelligence, backdoor decoding
122
+
123
+ **The release that scans what AI code actually gets wrong.** Built from the
124
+ 2025-2026 evidence base (Veracode GenAI report: 45% of generated samples ship an
125
+ OWASP Top-10 flaw; CSA/CodeRabbit: 1.91x IDOR in AI-co-authored PRs; GitGuardian
126
+ 2026: AI-assisted commits leak secrets at 3.2% vs 1.5%; Escape.tech: 65% of
127
+ vibe-coded apps had a security issue).
128
+
129
+ - **`vibeguard attack-surface` + `attack_surface` MCP tool.** Extracts every
130
+ entrypoint across Next.js (App Router, Pages API, **Server Actions**), Express,
131
+ Fastify, Hono, NestJS, tRPC, Supabase Edge Functions, serverless handlers,
132
+ FastAPI/Flask/Django, Rails, Gin/Echo and MCP tool registrations. Resolves
133
+ router mounts and middleware chains, then joins entrypoints × findings ×
134
+ import reachability: which route is reachable *now*, which finding is
135
+ exploitable from it, and which findings sit in dead code.
136
+ - **Authorization intelligence** (`src/routes.js`, `src/surface.js`): handler
137
+ extent by brace matching, in-body guard detection (auth/getServerSession/
138
+ requireUser/…), IDOR detection (object fetched by `params.id` with no
139
+ owner/tenant predicate), unguarded state-changing routes, Server Actions that
140
+ are public RPC endpoints, middleware matchers that exclude `/api`.
141
+ - **118 new rules in the 2026 pack** (`src/rules-2026.js`): IDOR/mass-assignment,
142
+ Next.js public-env secrets and middleware bypass, Supabase RLS *correctness*
143
+ (`USING (true)`, SECURITY DEFINER without `search_path`, service_role in the
144
+ client), Firebase rules, JWT (decode-not-verify, alg:none, weak fallback,
145
+ cookies), LLM output handling (exec/SQL/HTML, system-prompt injection, no
146
+ max_tokens, unbounded agent loops), weak crypto (md5 passwords, Math.random
147
+ tokens, ECB, static IV), CWE-117 log injection, 13 new secret formats
148
+ (OpenRouter, Groq, HuggingFace, NVIDIA, Replicate, Supabase PAT, service_role
149
+ JWT, …), CI script injection, compose/Docker/Terraform exposure, SSRF, SSTI,
150
+ open redirect, header injection, upload limits, postMessage origin checks.
151
+ - **Backdoor / obfuscation engine** (`src/obfuscation.js`, `scan_backdoors` MCP
152
+ tool): multi-layer decode (base64/hex/unicode/fromCharCode/rot13), encoded
153
+ payloads in executable position, javascript-obfuscator fingerprints,
154
+ fetch→eval loaders, curl|sh, PowerShell `-enc`, remote imports, hidden
155
+ Unicode/bidi, and behavioural co-occurrence (exec + network + env = dropper).
156
+ Skips minified vendor bundles to stay quiet on real projects.
157
+ - **AST coverage fix (critical).** Every `.jsx` file failed to parse (no JSX
158
+ plugin) and every `.tsx` file crashed the walker
159
+ (`No walker function defined for node type JSXElement`), silently degrading the
160
+ AST/taint pass on most React/Next code. Both fixed: JSX parser + JSX walkers
161
+ merged into `acorn-walk`'s base. Self-scan degraded files: 27 → 0.
162
+ - **Route intelligence hardened on real apps.** Handler references (`profileHandler.displayProfile`, `isLoggedIn`) now resolve to their AST ranges across files and constructor instances, middleware arguments count as guards, prefix guards (`app.use("/api/X", isAuthorized())`) apply to routes beneath them, Express `app.route(...).get(...)` chains are extracted, and tests/codefix fixtures are excluded. On OWASP NodeGoat: 20/22 routes correctly guarded and the real `/allocations/:userId` IDOR detected; on Juice Shop: 149 entrypoints (was 313 with test fixtures), 145 guarded. Unresolvable Express handlers report `auth: unknown` instead of a false "unguarded" claim.
163
+ - **`.rules` files are now scanned** — Firebase rules were never read before.
164
+ - **`--version`** prints the version instead of accidentally running a scan.
165
+ - Rule count 743 → 861, MCP tools 85 → 87.
166
+
167
+ ### Fixed — v1.7 dataflow-depth pass (a clean grade on live SQL injection)
168
+ - **CRITICAL: textbook SQL injection scanned as `Grade A, no issues`.**
169
+ `db.query(`SELECT * FROM users WHERE id = ${req.body.id}`)` — the most common
170
+ shape of SQLi in AI-generated code — produced a confident all-clear on a
171
+ default scan. Root cause: the AST taint pass skipped any sink argument for
172
+ which `exprIsSource()` was true, deferring to the regex layer. That predicate
173
+ returns true for a TemplateLiteral or concatenation that merely *interpolates*
174
+ a source, so the taint pass stepped aside for constructed strings while the
175
+ regex layer — matching different text — either missed them or rated them below
176
+ the default medium-confidence floor. Nobody reported the finding.
177
+ Fix: new `exprIsBareSource()` limits deferral to a source used verbatim, and
178
+ the three code-execution-grade sinks (`taint.sql-injection`,
179
+ `taint.command-injection`, `taint.code-injection`) never defer at all.
180
+ `db.query(req.body.sql)` was invisible for the same reason and is now caught.
181
+ - **Laundered sources now tracked**: destructuring, reassignment chains,
182
+ optional chaining, nested index access, and `spawn("sh", ["-c", ...])`.
183
+ - **Return-value taint across function boundaries.** The engine already followed
184
+ taint INTO a helper (param → sink); it now follows it back OUT
185
+ (`function getId(r) { return r.body.id }` → `db.query(...getId(req)...)`).
186
+ Records only the parameter index, so it fires only when the call site passes
187
+ an actual source — sanitizing helpers, constant-returning helpers, and calls
188
+ with non-source arguments stay clean.
189
+ - **`process` is no longer a blanket taint source.** Only `argv`, `argv0` and
190
+ `env` carry outside input. Treating every `process.*` property as attacker
191
+ input made `spawn(process.execPath, [script])` — the standard way to launch a
192
+ child Node process — report as command injection. Caught by dogfooding: it was
193
+ the scanner's own worst false positive after the deferral fix.
194
+ - **The AST taint pass no longer fails open silently.** A crash there dropped
195
+ analysis to the weaker regex engine with no signal at all — every
196
+ dataflow-confirmed finding disappeared while the scan still printed a clean
197
+ grade. `analyzeTaint()` now takes an `onDegrade` callback and the scanner
198
+ records it as a `taint-ast` degraded pass, so the CLI warns and `--strict`
199
+ refuses to report clean. (Discovered by causing it: a temporal-dead-zone bug
200
+ wiped every taint finding and nothing said a word.)
201
+
202
+ ### Changed
203
+ - `TAINT_TO_AST` → **`TAINT_SUPERSEDES`**, generalised from "taint shadows ast"
204
+ to "the higher-fidelity finding shadows every weaker counterpart on the same
205
+ line". One vulnerability now yields one finding: `taint.sql-injection` covers
206
+ `ast.sql-injection`, `code.sql-injection`, `db.sql-template-literal` and
207
+ `injection.orm-raw-user`; `taint.path-traversal` covers
208
+ `upload.filename-path-traversal`; and `go.sql-injection` collapses
209
+ `go.sql-format` + `go.sql-fmt-sprintf`, which used to triple-report a single
210
+ `fmt.Sprintf` injection.
211
+ - Exported `TAINT_SUPERSEDES` and `dedupeFindings` from `src/scanner.js`.
212
+
213
+ ### Added
214
+ - **Harder benchmark corpus** (120 → 136 files): 8 laundered-source recall cases
215
+ and 8 adversarial precision cases (`parseInt`, `db.escape`, allowlist
216
+ ternaries, parameterized queries, `spawn` arg arrays, constant table names,
217
+ sanitizing and constant-returning helpers) — every one puts `req.` inside or
218
+ beside a dangerous sink without being a bug.
219
+ - **Benchmark scorer now measures what users see.** It applies `dedupeFindings`
220
+ (previously it scored raw pre-dedupe rule hits, counting both halves of a
221
+ deliberately de-duplicated pair) and credits an expected rule when a rule that
222
+ supersedes it fired instead — which cannot excuse a real miss, since a finding
223
+ that is neither present nor superseded still scores FN.
224
+ Result: **119/119 cases, 0 FP, 0 FN** (previously 96.0% F1, 4 FP, 5 FN).
225
+ A saturated corpus means the corpus stopped being hard, not that the scanner
226
+ is complete — stated as such in the README.
227
+ - 11 regression tests (`test/taint-depth-tests.js`), all asserted against a
228
+ DEFAULT scan: a finding only visible under `--all` is not protection.
229
+ **508 tests total, 0 failures.**
230
+ - Corrected `stripe-key.js` benchmark expectation, which required
231
+ `secret.generic-credential` alongside `secret.stripe-live-key`.
232
+ `dedupeFindings` has always suppressed the generic rule when a specific one
233
+ covers the line; the expectation described pre-dedupe output.
234
+
235
+
236
+ ### Added — v1.6 token-lean pass (TLAP: treat the agent's context window as a budget)
237
+ - **`src/tokenlean.js` — TLAP, the Token-Lean Agent Protocol.** Every scanner in
238
+ this space answers an AI agent with pretty-printed JSON: two-space indentation,
239
+ repeated object keys, and the same `message` + `fix` string duplicated once per
240
+ occurrence. TLAP encodes the same information — no findings dropped silently —
241
+ in a line-oriented, de-duplicated, dictionary-compressed form. Four levers:
242
+ no pretty JSON, cluster by rule (rule text is a property of the rule, not of
243
+ the occurrence), path-prefix dictionary, and a risk-ranked budget.
244
+ Measured on this repo: **64,076 → 5,492 estimated tokens, a 91.4% cut** on a
245
+ 463-finding / 293-file scan. Zero new dependencies.
246
+ - **`vibeguard scan --lean`** — the lean dialect from the CLI.
247
+ - **`--budget <n>` / `VIBEGUARD_TOKEN_BUDGET`** — a hard token ceiling. The budget
248
+ is spent highest-risk first: severity × confidence, with dataflow-confirmed,
249
+ exploitable (taint/secret/idor/auth/ssrf…) and security-hotspot-path findings
250
+ outranking pattern-only matches at equal severity. Whatever does not fit is
251
+ reported as an explicit rollup with per-severity counts and the rule ids, and
252
+ the payload states `NOT an all-clear`. Truncation can never read as clean.
253
+ - **`--lean --delta`** — delta scans against a stored fingerprint snapshot
254
+ (`.vibeguard/tlap-snapshot.json`, shared by the CLI and the MCP server). When
255
+ nothing changed the whole answer is one line, ~20 tokens instead of ~5,000;
256
+ otherwise only new findings are listed and resolved ones are counted.
257
+ - **`vibeguard tokens [dir]`** (+ `token_report` MCP tool) — reproduce the savings
258
+ claim on any repository. `--json` for machine output.
259
+ - **MCP: lean is now the default dialect** for `scan_project` and `suggest_fixes`
260
+ (`format: "json"` restores the old payload; `budget` and `delta` are per-call
261
+ arguments). Lean fix plans state each remediation once per rule and drop the
262
+ diagnosis — when the task is "apply the fix", the diagnosis is not the payload.
263
+ - **Layer 14 — context-window budget guard.** Any of the 85 MCP tools is clamped
264
+ to the configured budget before returning, so a single large payload cannot
265
+ evict an agent's working memory. Truncation is always disclosed.
266
+ - Offline token estimator (no tokenizer dependency, ~±10% of a real BPE count).
267
+ Deterministic: identical input produces byte-identical output.
268
+ - 17 new tests covering losslessness, budget behaviour, risk ordering, delta
269
+ mode, determinism, and the "never silently lossy" guarantee. **497 total, 0 failures.**
270
+
271
+ ### Fixed
272
+ - Transitive advisories cleared via `overrides`: `fast-uri` → ^4.2.1 (host
273
+ confusion / SSRF via IPv6 normalization), `hono` → >=4.13.8 (`toSSG()` path
274
+ escape, `parseBody()` memory exhaustion), `qs` → >=6.15.4 (array-limit bypass,
275
+ DoS). Self-scan back to **Grade A** on 293 files.
276
+ - `outputResult`'s lean path no longer joins a user-supplied scan root with a
277
+ path inside the CLI: snapshot persistence moved into `src/tokenlean.js` behind
278
+ a resolved-root helper, clearing 5 self-reported `taint.path-traversal`
279
+ findings at the source rather than suppressing them.
280
+
281
+
282
+ ### Added — v1.5 active-security pass (beat Strix.ai on the active front)
283
+ - **`vibeguard pentest <url>`** — active web/API probe suite, zero deps, deterministic
284
+ (Strix.ai-class "autonomous pentesting" without the LLM). ~20 probe families:
285
+ security headers (CSP/HSTS/XFO/XCTO/RP/PP + HSTS max-age + CSP unsafe-inline),
286
+ CORS (reflected origin / null / wildcard+creds), open redirect (10 paths × 10
287
+ params × 4 payloads), exposed files (30+ paths, content-signature + 404-baseline
288
+ FP guards), GraphQL introspection (`__typename` gate + extended endpoints),
289
+ verbose errors (≥2 stack markers), rate limiting (auth endpoints, OWASP API8),
290
+ JWT alg:none (4 case variants) + weak-HMAC (opt-in `--token`), TLS version/cert
291
+ validity, cookie flags, banner disclosure. Every finding: severity + CWE +
292
+ evidence + curl reproduction. Exit 0/1/2.
293
+ - **`--verify-ssrf` — out-of-band SSRF proof-of-exploit**: local callback listener
294
+ + form (action, input) harvesting + query-param fuzzing; target fetching the
295
+ listener URL = deterministic proof (Strix's "proof for every finding").
296
+ Live demo: CRITICAL web.ssrf-proof, callback observed, parameter: url.
297
+ - **`vibeguard pr-scan`** — PR review gate, Strix-compatible exit codes
298
+ (0 clean / 2 findings / 1 fatal). Added-lines-only reporting (full-file taint
299
+ analysis, findings filtered to changed lines); scopes: working tree, `--staged`,
300
+ `--base <ref>...HEAD`.
301
+ - **`vibeguard fix --apply --verify`** — retest loop: re-scan after applying
302
+ snapshot-backed fixes, report ✓/⚠ per finding ("fix verified" parity).
303
+ - **`vibeguard pre-deploy --pentest-url <url>`** — 14th deploy gate: live pentest;
304
+ critical/high fail the gate, medium warns. runPreDeployGate is now async.
305
+ - **Engine fixes (taint-ast.js):** process.stdout/stderr, console, logger and
306
+ client/transport objects (req/socket/upstreamReq) are excluded from the
307
+ res.send/write/end XSS sink — CLI tools logging user input are no longer FPs.
308
+ - Suite: 468 → **480 tests** (pentest +7 incl. pre-deploy gate E2E, pr-scan +5).
309
+ Self-scan Grade A on 291 files.
310
+
311
+
312
+ ### Added — v1.4 power pass (git history · runtime LLM guard · evasion decoders)
313
+ - **`vibeguard git-scan`** — scans a repo's ENTIRE git history for leaked secrets
314
+ (Gitleaks/TruffleHog parity). Blob-level enumeration via `git rev-list --objects --all`
315
+ + streaming `git cat-file --batch`, dedupe by blob sha, binary skip, commit attribution
316
+ for every finding. Flags: `--since`, `--max-commits`, `--max-blobs`, `--json`.
317
+ Suite: 431 → 435 tests.
318
+ - **`vibeguard llm-proxy`** — OpenAI-compatible local guard proxy (Lakera-class, free,
319
+ offline, zero deps). `POST /v1/chat/completions` (JSON + SSE streaming), `GET /v1/models`,
320
+ `POST /v1/completions` + `/v1/embeddings` passthrough. Scans prompts AND responses for
321
+ secrets (`secret.*` rules), PII (`pii.js`), prompt injection (deterministic patterns).
322
+ Modes: `block` (403), `redact` (in-place masking incl. streaming deltas), `report`.
323
+ Streaming SSE is scanned per chunk; a violating stream is destroyed mid-flight.
324
+ `--system-prompt-file` detects the model echoing your own system prompt.
325
+ Suite: +12 tests (incl. `testSystemPromptLeak`).
326
+ - **`src/injection-decode.js`** — deterministic evasion decoders: base64, `\xNN`/`\uNNNN`
327
+ escapes, ROT13 (whole-line), zero-width chars + homoglyph normalization. 4 new rules:
328
+ `ai.prompt-injection-encoded-base64`, `-escapes`, `-rot13`, `ai.prompt-injection-obfuscated`.
329
+ Phrase-gated: fires only when decoded text contains a canonical injection phrase.
330
+ - **Entropy upgrade** — `src/entropy.js` + `secret.high-entropy-token` rule: catches
331
+ unquoted `.env`-style tokens (key-like context gate, ±2 lines) and hex-charset secrets;
332
+ keeps the existing quoted-string `secret.high-entropy` rule; dedupes against specific
333
+ `secret.*` findings and excludes public BaaS keys (Firebase `AIza…`, Supabase anon).
334
+ Scanner fileRules loop now supports `match(content, ctx)` function rules.
335
+ - **Custom user rules** — `.vibeguardrc.json` → `"customRules": [{ id, severity, title, re,
336
+ message, fix }]`; compiled at configure() time, invalid regexes skipped (never crash),
337
+ re-added on every scan, cleared between scans (no config leakage).
338
+ - **CWE/OWASP metadata** on rules.js core groups (secret/injection/ai/pii) — SARIF parity
339
+ with Semgrep/Bearer metadata consumers.
340
+ - Suite: 435 → **468 tests** (entropy +21, llm-proxy +12, git-scan +4). Rules: 766 → **771**.
341
+
342
+
343
+ ### Added — Keyless open GIFs (no API key)
344
+ - New `vibeguard gif <query>` CLI command and `gif_search` MCP tool (84th tool).
345
+ Fetches open GIFs with **zero API keys** using byte-verified open backends:
346
+ cataas cat GIFs (+ text overlay via `/cat/gif/says/<text>`), yesno.wtf
347
+ yes/no reactions. Dead/key-walled backends skipped: Tenor (needs key),
348
+ GIPHY demo key (now 401), Klipy (auth wall), Reddit JSON (IP-blocked).
349
+ - New `src/gif.js` engine: single-redirect HTTPS fetch, GIF magic-byte
350
+ verification, cataas 500-fallback, `downloadGif()` save-to-disk.
351
+ - Offline regression test for the routing logic (never selects a key-walled
352
+ backend). Suite 430 → 431 passed.
353
+
354
+ ### Fixed — Dogfood + dependency hygiene
355
+ - **Autofix bug:** the `error.empty-catch` autofix rewrote `catch {}` as
356
+ `catch { console.error(err); }` — `err` is not bound in an optional catch
357
+ clause, so every autofixed file threw `ReferenceError: err is not defined`
358
+ at runtime. Now it emits `catch (err) { console.error(err); }` (or reuses an
359
+ existing binding: `catch (e) {}` → `catch (e) { console.error(e); }`). New
360
+ regression test executes the fixed output in a VM to prove no ReferenceError.
361
+ - **Demo site false positive:** `website/index.html` demo placeholder contained
362
+ a hardcoded `sk-proj-…` string (example text), which the scanner correctly
363
+ flagged as `secret.openai-key`. Replaced with inert `<KEY>` placeholders —
364
+ VibeGuard's own repo scan went from **Grade F → Grade A** (0 findings / 275
365
+ files).
366
+ - **Dependency vulnerabilities (npm audit → 0):** `@hono/node-server`
367
+ (1.19.14 → 2.1.0, path traversal), `ip-address` (10.2.0 → 10.4.0, SSRF
368
+ class), `brace-expansion` (5.0.9), `fast-uri` (4.1.2), `hono` (≥4.12.34) —
369
+ all transitive via `@modelcontextprotocol/sdk`, pinned through
370
+ `package.json` `overrides`. The SDK's own range permits these versions.
371
+ - **Lint hygiene:** eslint now ignores `**/.vibeguard/` (autofix snapshot
372
+ store) — `no-unused-vars` warnings back to the 120s, still 0 errors.
373
+ - **MCP robustness:** `scan_secrets_history` handler tolerates both a bare
374
+ array and the `{ findings, … }` shape from `history.scanHistory()` (was
375
+ `findings.map is not a function`).
376
+
377
+ ### Fixed — Agent interop (MCP)
378
+ - **Critical:** the MCP `tools/call` handler read the tool name from the request
379
+ object instead of `req.params`, so every agent (Claude Code, Cursor, Windsurf,
380
+ Codex, Hermes, …) got `Unknown tool: undefined` on ANY of the 82 tools. Now
381
+ reads `req.params` per the SDK contract; verified with a live JSON-RPC stdio
382
+ handshake and a new regression test (`mcp: full stdio handshake —
383
+ initialize, tools/list, tools/call`) that speaks the protocol like a real
384
+ client, so this class of bug cannot ship again.
385
+ - Added `scripts/live-mcp-check.js` — standalone MCP health check that boots the
386
+ server, handshakes, lists tools, calls `scan_project` + `check_code`, and
387
+ verifies unknown-tool errors name the tool.
388
+ - Lint hygiene: removed dead code + unused vars in `src/taint-ast.js`
389
+ (warnings 125 → 121). Benchmark unchanged: 96.0% F1, 428/428 tests.
390
+ - `src/install.js`: added a **Hermes Agent** installer (16th client). Detects
391
+ `$HERMES_HOME/config.yaml` and emits safe `hermes config set` instructions for
392
+ the `mcp_servers.vibeguard` entry — it never hand-edits the YAML. README count
393
+ updated to 16 AI clients.
394
+
395
+ ### Added — Phase 1: Compliance + MCP Tools + Breadth
396
+ - 4 new MCP tools (82 total): `generate_sbom`, `dep_reachability`,
397
+ `scan_container_image`, `license_compliance`.
398
+ - `vibeguard sbom [dir]` — CycloneDX 1.5 SBOM from `package-lock.json` +
399
+ source import graph. Marks which deps are actually imported in code.
400
+ `src/sbom.js`.
401
+ - `vibeguard reachability [dir]` — cross-references CVE results against
402
+ the actual import graph. Separates reachable vulns (imported — fix first)
403
+ from transitive-only (lower priority).
404
+ - `vibeguard container-scan <image>` — shells out to `trivy` for container
405
+ image vulnerability scanning. Graceful fallback when trivy absent.
406
+ - `vibeguard license [dir]` — checks `package.json` licenses against an
407
+ allowlist (MIT/ISC/BSD/Apache/0BSD). `--allow GPL-3.0` adds custom
408
+ licenses. Flags GPL/AGPL/unlicensed.
409
+ - 4 new compliance frameworks (10 total): NIST CSF 2.0, OWASP ASVS L1/L2/L3,
410
+ CIS Controls v8, NIST SP 800-53 Rev. 5. `src/compliance.js`,
411
+ `src/rules-pack.js` `COMPLIANCE_MAP`.
412
+ - Fixed PCI-DSS from 3.2.1 control IDs to actual v4.0 IDs (6.2.4, 8.3.2, etc.).
413
+ - 3 new AI client installers (15 total): Copilot CLI, Amazon Q Developer,
414
+ Sourcegraph Cody. `src/install.js`.
415
+ - 3 new CI templates (7 total): Bitbucket Pipelines, Travis CI, Buildkite.
416
+ `ci-templates/`.
417
+
418
+ ### Changed — Phase 0: Honesty Fixes
419
+ - `deep_scan` reframed from "LLM-powered deep review" (overclaim) to
420
+ "agentic deep review" — emits structured review contracts for the
421
+ consuming AI client. VibeGuard never calls an LLM. `src/mcp-server.js`.
422
+ - Sandbox `vm` limits documented honestly: Node `vm` is not a security
423
+ boundary, memory cap is unenforced. `src/sandbox.js`, `README.md`.
424
+ - Stale test floors bumped: 200+ → 500+ rules, 40/54 → 78+ MCP tools.
425
+ - README honest-scope expanded: sandbox vm, AI-safety recall 57%, taint
426
+ JS/TS-only, VibeGuard never calls LLM.
427
+
428
+ ### Added
429
+ - Self-integrity verification. `vibeguard self-check` now cryptographically
430
+ verifies the CONTENT of its critical security modules (action-guard,
431
+ shell-guard, interceptor, firewall, rules, scanner, taint, mcp-audit, …)
432
+ against a shipped SHA-256 manifest (`src/integrity.json`), not just that they
433
+ load. Detects a patched/neutered guard — e.g. `inspectAction` rewritten to
434
+ always allow, or a rule file gutted — which a load-only check missed. Manifest
435
+ is regenerated on `prepublishOnly` (and via `npm run integrity`). Honest limit:
436
+ detects source tampering, not a full chain of trust; verify npm provenance for
437
+ the trust anchor. `src/integrity.js`, `scripts/gen-integrity.js`.
438
+ - Agent Action Firewall — `vibeguard guard-action` + `guard_action` MCP tool +
439
+ `src/action-guard.js` (`inspectAction`). Real-time exfiltration guard:
440
+ inspect any agent action (shell / network / file-write / prompt / MCP call)
441
+ BEFORE it runs and block secret or personal-data exfiltration. Hard rule — an
442
+ API key or PII (email, SSN, credit card, phone) should not leave to an external
443
+ host: secrets blocked unconditionally, PII blocked (or warn), local/allowlisted
444
+ hosts permitted. Also blocks cloud-metadata credential theft, secrets written
445
+ to web-served paths, and secrets in LLM prompts. `sanitizeOutbound()` redacts
446
+ instead of dropping. 100% offline, fail-closed on the block path. A guard, not
447
+ a sandbox.
448
+ - `vibeguard agent-scan` — AI Agent Security Posture (new `agent_scan` MCP tool
449
+ too). One graded verdict — "is my AI-agent setup safe?" — aggregating every
450
+ agent-era check into threat categories: MCP-server trust, PII/secret leakage
451
+ to LLM providers, LLM output reaching exec/eval/SQL/DOM, prompt injection,
452
+ agent capability/loop safety, and hallucinated dependencies. Pure offline
453
+ orchestration of already-tested modules (mcp-audit + ai-guard + the `ai.*`
454
+ rule family). `--fail-on <level>` to gate CI.
455
+ - `vibeguard mcp-audit` — MCP server security audit (new `mcp_audit` MCP tool
456
+ too). Audits the MCP servers an agent is configured to trust
457
+ (`.mcp.json` / `.cursor/mcp.json` / `.vscode/mcp.json`) for tool poisoning
458
+ (prompt injection in server args/descriptions), unpinned auto-install
459
+ (`npx -y` rug-pull surface), remote-code / shell commands, hardcoded secrets
460
+ in `env`, over-broad filesystem grants, and **definition drift** — a server
461
+ whose config changed since you approved it (classic MCP rug-pull). 100%
462
+ offline: reads config only, never runs a server. Pins server-definition
463
+ hashes under `.vibeguard/mcp-pins.json`; `--pin` re-baselines after review.
464
+ - `vibeguard scan --staged` — scan only git-staged files. Ideal for a
465
+ pre-commit hook: fast and scoped to exactly what's being committed. Per-file
466
+ only (cross-file analysis skipped, and the CLI says so).
467
+ - `vibeguard scan --no-suppress` — CI trust mode. Ignores inline
468
+ `vibeguard-ignore` comments and the heuristic false-positive filter so a
469
+ careless or hostile inline comment in a PR cannot silence a gate. Deliberate
470
+ project config (ignoreRules/ignorePaths) is still honored.
471
+ - Fail-loud coverage tracking. Every analysis pass (taint, python-taint, AST,
472
+ file-rules) that errors is now recorded instead of silently swallowed. Scan
473
+ results carry `engine` (`ast` | `regex-only`) and `diagnostics`
474
+ (degraded passes, parse-failed files, degraded file count). The CLI prints a
475
+ loud banner when running `regex-only` (acorn missing) or when any file was
476
+ only partially analyzed — a degraded scan no longer masquerades as clean.
477
+ - `vibeguard scan --strict` — exit code 3 when any file scanned degraded, so CI
478
+ never trusts an incomplete result. **Note:** existing CI configs that add
479
+ `--strict` will now hard-fail on degraded scans (intended).
480
+ - Benchmark quality gate: `node test/benchmark/run.js --gate` fails (exit 2) if
481
+ overall precision/recall/F1 regress below a floor (P≥80% / R≥78% / F1≥80%;
482
+ override via `VIBEGUARD_BENCH_MIN_*`). Wired into CI so detection quality
483
+ regressions block merges.
484
+ - ReDoS / pathological-input regression tests + coverage-transparency tests.
485
+ - Engine mode + degraded-coverage now surfaced in JSON output and the MCP
486
+ `scan` tool (payload + summary) so agents don't treat a degraded scan as an
487
+ all-clear.
488
+ - `VIBEGUARD_NO_POSTINSTALL=1` (and CI auto-detect) to silence the install
489
+ message.
490
+ - README `Coverage & Limits` section: honest per-language detection-depth
491
+ matrix, engine-mode explainer, fail-loud explainer, and an explicit "the
492
+ shell guard is a mistake-catcher, not a sandbox" statement.
493
+ - `vibeguard auto` — one-command full autonomous protection. Activates
494
+ daemon (file watcher), pre-commit hook, post-edit hook, and shell guard.
495
+ Idempotent. `--stop` reverses everything and restores backups. `--status`
496
+ shows what's active. `--ci` for pipeline mode. `--fix` for safe auto-fixes.
497
+ `--no-shell` to skip shell hook. `--strict` to block on HIGH too.
498
+ - `src/auto.js` orchestrator composing existing modules (scanner, daemon,
499
+ hook, shell-guard). All state under `.vibeguard/auto.json`.
500
+ - Shell hook FP fix: default-allow policy. Unknown commands are allowed.
501
+ Only block on known dangerous patterns. Fail-open on module load errors.
502
+ Both `shell-hook.sh` and `shell-hook.ps1` now try multiple module paths
503
+ and never block when VibeGuard can't load.
504
+
505
+ ### Performance
506
+ - Incremental scanning: `vibeguard scan --changed` only rescans files whose
507
+ content changed since the last scan (SHA-256 hash cache under
508
+ `.vibeguard/cache`). Warm re-scan of an unchanged tree drops from ~600ms to
509
+ ~5ms in local testing (~100×+). Per-file only — cross-file taint/rules are
510
+ skipped in this mode and the CLI says so; run a full scan for those. Intended
511
+ for pre-commit and watch loops.
512
+ - Fixed: the scanner no longer walks its own `.vibeguard/` cache/baseline
513
+ artifacts (added to the skip-dirs list).
514
+ - Scanner ~50% faster (108ms → 54ms/file on the repo's own source). Three
515
+ behavior-preserving changes, verified identical findings + unchanged benchmark
516
+ (95 TP / 15 FP / 16 FN):
517
+ 1. Memoize the global-flag regex per rule — the hot path was recompiling a
518
+ fresh `RegExp` per rule *per line* (~64% of scan time).
519
+ 2. Hoist the `fileFilter` check out of the per-line loop (it depends only on
520
+ the path) and cache the compiled filter.
521
+ 3. Provably-safe literal prefilter: skip a rule when a mandatory literal from
522
+ its regex is absent from the line, avoiding the regex entirely. Never
523
+ introduces a false negative (bails on alternation, ignores optional/grouped
524
+ literals). Guarded by unit tests + a throughput regression test.
525
+
526
+ ### Fixed
527
+ - Interceptor: wrapped `fs.readFileSync` called itself instead of the saved
528
+ original, causing infinite recursion / stack overflow on any uncached file
529
+ read after activation. Now calls the original. Regression test added.
530
+
531
+ ### Changed
532
+ - Agent Action Firewall now blocks UNKNOWN-format secrets, not just known vendor
533
+ patterns. An outbound field named like a credential (`apiKey`, `secret`,
534
+ `password`, `client_secret`, `private_key`, `access_key`, …) carrying a
535
+ high-entropy value is blocked from leaving to an external host — so a custom
536
+ API key or session secret that matches no known regex can't exfiltrate either.
537
+ Precise by design: the credential NAME plus real entropy avoids false
538
+ positives on content hashes, UUIDs, ids, env-var references, and low-entropy
539
+ placeholders (all verified). Ambiguous names (token/bearer/session) are
540
+ intentionally excluded to avoid breaking legitimate auth traffic.
541
+ - Runtime interceptor now delegates to the unified Agent Action Firewall
542
+ (`action-guard.inspectAction`). Every wrapped `fetch` / `http` / `exec` /
543
+ `execSync` call is checked with the hardened, shared logic — so obfuscated
544
+ commands (base64, `$IFS`, variable indirection) and secrets embedded in a
545
+ request URL are now blocked at runtime, which the interceptor's old naive
546
+ `.includes()` check missed. `CONFIG.allowDomains` are honored as trusted
547
+ destinations. Protection is automatic once the interceptor is active — no
548
+ per-call `guard_action` needed.
549
+ - Python taint analysis rewritten as single-pass taint propagation (still pure
550
+ JS — no external parser, keeps VibeGuard zero-dependency and offline). Tracks
551
+ tainted variables through intermediate assignments (`q = "..." + data` →
552
+ `execute(q)`) and clears taint on clean reassignment. Fixes false positives
553
+ where a tainted name merely appeared near an unrelated sink. Parameterized SQL
554
+ (`execute("... %s ...", (params,))`) and inline-sanitized sinks
555
+ (`eval(int(x))`, `os.system(shlex.quote(x))`) are not flagged; unsafe
556
+ concatenation / f-string flows still fire.
557
+ - Shell guard normalizer hardened. Now substitutes ALL variable assignments
558
+ (previously only the first, a real bypass: `A=rm; B=-rf; $A $B /`), handles
559
+ `$IFS` word-splitting and `/usr/bin/rm`, and iterates to a fixpoint so layered
560
+ obfuscation unwinds. Still, by design, a mistake-catcher — not a sandbox.
561
+ - CI workflow renamed `test.yml` → `ci.yml` to match the README status badge.
562
+ - Taint analysis upgraded from regex-only to scope-aware, AST-based dataflow
563
+ (`taint-ast.js`). Sources/sinks matched on AST nodes (MemberExpression /
564
+ CallExpression), not text. Respects block/function scope with shadowing,
565
+ clears taint on clean reassignment, recognizes sanitizers (parseInt,
566
+ path.basename, DOMPurify.sanitize, etc. — configurable array). Tracks
567
+ cross-function taint within a file via intra-function fixpoint. All
568
+ AST-confirmed findings carry `confidence: "high"` and `dataflow: true`.
569
+ Regex taint retained as fallback for unparseable files. Finding object
570
+ shape unchanged (ruleId/severity/title/message/fix preserved).
571
+
572
+ ### Added
573
+ - Cross-file taint analysis via import/export graph (`crosstaint.js`)
574
+ - Optional AST mode with acorn + acorn-typescript (`ast.js`)
575
+ - `vibeguard doctor` — AI host security audit (hook injection, base URL hijack, MCP config)
576
+ - `vibeguard history` — git history secret scan
577
+ - `vibeguard watch` — re-scan on file change
578
+ - `vibeguard rules` / `vibeguard explain` — rule listing and documentation
579
+ - Live key verification (`--verify-keys`) for OpenAI + Stripe
580
+ - Inline suppressions (`vibeguard-ignore-line` / `vibeguard-ignore-next-line`)
581
+ - Project config (`.vibeguardrc.json`) with ignoreRules, ignorePaths, severityOverrides
582
+ - .gitignore-aware secret scanning
583
+ - Stable finding fingerprints for SARIF + baseline diffing
584
+ - External scanner support: semgrep, gitleaks, bandit
585
+ - 15 secret types (GitHub, Slack, GitLab, Twilio, SendGrid, Mailgun, Telegram, npm, Resend, connection strings, public-LLM-key)
586
+ - AI security rules (browser-api-key, disabled-sandbox, eval-llm-output, prompt-injection-marker)
587
+ - Injection rules (prototype pollution, ReDoS, XXE, CRLF)
588
+ - Framework rules (Prisma raw, React dangerous HTML, reflected XSS)
589
+ - IaC rules (Dockerfile, GitHub Actions, Terraform)
590
+ - Package hygiene (unpinned deps, dangerous scripts, no lockfile)
591
+ - 63 tests, all passing
592
+
593
+ ## [0.1.0] - Initial release
594
+ - Core scanner with secrets, injection, auth, config, PII rules
595
+ - Fix → verify loop with baseline + rollback
596
+ - MCP server (5 tools)
597
+ - Live URL scan
598
+ - Badge generation
599
+ - One-command multi-client installer
600
+ - Pre-commit hook
601
+ - GitHub Actions CI template
602
+ - SARIF 2.1.0 output
603
+ - Zero runtime dependencies (scanner)
604
+