@yagyeshvyas/vibeguard 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,41 @@ Format based on [Keep a Changelog](https://keepachangelog.com/).
6
6
  ## [Unreleased]
7
7
 
8
8
  ### Added
9
+ - Self-integrity verification. `vibeguard self-check` now cryptographically
10
+ verifies the CONTENT of its critical security modules (action-guard,
11
+ shell-guard, interceptor, firewall, rules, scanner, taint, mcp-audit, …)
12
+ against a shipped SHA-256 manifest (`src/integrity.json`), not just that they
13
+ load. Detects a patched/neutered guard — e.g. `inspectAction` rewritten to
14
+ always allow, or a rule file gutted — which a load-only check missed. Manifest
15
+ is regenerated on `prepublishOnly` (and via `npm run integrity`). Honest limit:
16
+ detects source tampering, not a full chain of trust; verify npm provenance for
17
+ the trust anchor. `src/integrity.js`, `scripts/gen-integrity.js`.
18
+ - Agent Action Firewall — `vibeguard guard-action` + `guard_action` MCP tool +
19
+ `src/action-guard.js` (`inspectAction`). Real-time "nothing leaks" guard:
20
+ inspect any agent action (shell / network / file-write / prompt / MCP call)
21
+ BEFORE it runs and block secret or personal-data exfiltration. Hard rule — an
22
+ API key or PII (email, SSN, credit card, phone) never leaves to an external
23
+ host: secrets blocked unconditionally, PII blocked (or warn), local/allowlisted
24
+ hosts permitted. Also blocks cloud-metadata credential theft, secrets written
25
+ to web-served paths, and secrets in LLM prompts. `sanitizeOutbound()` redacts
26
+ instead of dropping. 100% offline, fail-closed on the block path. A guard, not
27
+ a sandbox.
28
+ - `vibeguard agent-scan` — AI Agent Security Posture (new `agent_scan` MCP tool
29
+ too). One graded verdict — "is my AI-agent setup safe?" — aggregating every
30
+ agent-era check into threat categories: MCP-server trust, PII/secret leakage
31
+ to LLM providers, LLM output reaching exec/eval/SQL/DOM, prompt injection,
32
+ agent capability/loop safety, and hallucinated dependencies. Pure offline
33
+ orchestration of already-tested modules (mcp-audit + ai-guard + the `ai.*`
34
+ rule family). `--fail-on <level>` to gate CI.
35
+ - `vibeguard mcp-audit` — MCP server security audit (new `mcp_audit` MCP tool
36
+ too). Audits the MCP servers an agent is configured to trust
37
+ (`.mcp.json` / `.cursor/mcp.json` / `.vscode/mcp.json`) for tool poisoning
38
+ (prompt injection in server args/descriptions), unpinned auto-install
39
+ (`npx -y` rug-pull surface), remote-code / shell commands, hardcoded secrets
40
+ in `env`, over-broad filesystem grants, and **definition drift** — a server
41
+ whose config changed since you approved it (classic MCP rug-pull). 100%
42
+ offline: reads config only, never runs a server. Pins server-definition
43
+ hashes under `.vibeguard/mcp-pins.json`; `--pin` re-baselines after review.
9
44
  - `vibeguard scan --staged` — scan only git-staged files. Ideal for a
10
45
  pre-commit hook: fast and scoped to exactly what's being committed. Per-file
11
46
  only (cross-file analysis skipped, and the CLI says so).
@@ -68,7 +103,29 @@ Format based on [Keep a Changelog](https://keepachangelog.com/).
68
103
  introduces a false negative (bails on alternation, ignores optional/grouped
69
104
  literals). Guarded by unit tests + a throughput regression test.
70
105
 
106
+ ### Fixed
107
+ - Interceptor: wrapped `fs.readFileSync` called itself instead of the saved
108
+ original, causing infinite recursion / stack overflow on any uncached file
109
+ read after activation. Now calls the original. Regression test added.
110
+
71
111
  ### Changed
112
+ - Agent Action Firewall now blocks UNKNOWN-format secrets, not just known vendor
113
+ patterns. An outbound field named like a credential (`apiKey`, `secret`,
114
+ `password`, `client_secret`, `private_key`, `access_key`, …) carrying a
115
+ high-entropy value is blocked from leaving to an external host — so a custom
116
+ API key or session secret that matches no known regex can't exfiltrate either.
117
+ Precise by design: the credential NAME plus real entropy avoids false
118
+ positives on content hashes, UUIDs, ids, env-var references, and low-entropy
119
+ placeholders (all verified). Ambiguous names (token/bearer/session) are
120
+ intentionally excluded to avoid breaking legitimate auth traffic.
121
+ - Runtime interceptor now delegates to the unified Agent Action Firewall
122
+ (`action-guard.inspectAction`). Every wrapped `fetch` / `http` / `exec` /
123
+ `execSync` call is checked with the hardened, shared logic — so obfuscated
124
+ commands (base64, `$IFS`, variable indirection) and secrets embedded in a
125
+ request URL are now blocked at runtime, which the interceptor's old naive
126
+ `.includes()` check missed. `CONFIG.allowDomains` are honored as trusted
127
+ destinations. Protection is automatic once the interceptor is active — no
128
+ per-call `guard_action` needed.
72
129
  - Python taint analysis rewritten as single-pass taint propagation (still pure
73
130
  JS — no external parser, keeps VibeGuard zero-dependency and offline). Tracks
74
131
  tainted variables through intermediate assignments (`q = "..." + data` →