guardvibe 3.5.0 → 3.7.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 +22 -0
- package/README.md +9 -9
- package/build/data/rules/cve-versions.js +36 -0
- package/build/tools/check-code.js +20 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ All notable changes to GuardVibe are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.7.0] - 2026-06-07
|
|
9
|
+
|
|
10
|
+
### Added — 3 fresh CVE rules from daily intel (438 → 441 rules / 37 tools)
|
|
11
|
+
- The freshness moat in action — June 2026 advisories (past typical model training cutoffs) for mainstream stack libraries, surfaced via `npm run intel`:
|
|
12
|
+
- **VG1085** — DOMPurify XSS via `<selectedcontent>` re-clone (CVE-2026-47423). Only `dompurify` 3.4.4 is affected; 3.4.5 fixes it.
|
|
13
|
+
- **VG1086** — React Router 7 multi-CVE cluster (CVE-2026-33245 RSC `javascript:` XSS, CVE-2026-42211 turbo-stream deserialization → unauth RCE, CVE-2026-42342 + CVE-2026-34077 DoS): `react-router` 7.0.0–7.14.x (fixed 7.15.0) and `@remix-run/server-runtime` 2.10.0–2.17.4 (fixed 2.17.5).
|
|
14
|
+
- **VG1087** — Better Auth device-authorization approval bypass (CVE-2026-45337): `better-auth` 1.6.0–1.6.10 (fixed 1.6.11).
|
|
15
|
+
- **0-FP semver:** patterns only match the genuinely-vulnerable pins — a caret/tilde range that resolves to the fixed patch is NOT flagged (DOMPurify/Better Auth exact-only; React Router exact/tilde, not caret). Validated against the corpus: **0 false positives** across all `package.json` files. 22 new version-range unit tests.
|
|
16
|
+
- Counts updated everywhere (consistency guard enforces 441); CVE-rule count 67 → 70.
|
|
17
|
+
|
|
18
|
+
Gate green (build / lint / test / self-audit PASS / A / 0).
|
|
19
|
+
|
|
20
|
+
## [3.6.0] - 2026-06-07
|
|
21
|
+
|
|
22
|
+
### Fixed — VG120 SSRF false-positive narrowing (sustain 0-FP) (438 rules / 37 tools)
|
|
23
|
+
- **VG120 (SSRF) no longer fires on URLs that are provably not request-controlled.** The regex flags `fetch(variable)` for any bare identifier; it now skips when the URL variable is assigned from a **literal `https://` constant** or **`process.env`** (including an env default parameter, e.g. `webhook = process.env.SOLUTIONS_WEBHOOK`), and skips **minified bundles**. `new URL(...)` is deliberately NOT treated as safe (it may wrap user input).
|
|
24
|
+
- **Validated against the corpus (clean old-vs-new diff): 1 false positive removed, 0 true positives lost, 0 new findings, 0 drift in any other rule.** Recall on genuinely user-controlled URLs is preserved (covered by tests).
|
|
25
|
+
- **Honest limitation:** URLs built from a constant *base variable* (`` `${apiBase}/path` ``) or returned from a helper still need real dataflow to classify safely, so they are intentionally left as-is for a future AST/dataflow engine rather than narrowed by regex (which would risk hiding a real SSRF). The precise signal for user-input→request flows already exists via the SSRF taint sink.
|
|
26
|
+
- No rule or tool changes (438 / 37).
|
|
27
|
+
|
|
28
|
+
Gate green (build / lint / test / self-audit PASS / A / 0).
|
|
29
|
+
|
|
8
30
|
## [3.5.0] - 2026-06-07
|
|
9
31
|
|
|
10
32
|
### Added — agent-native structured output (`guardvibe.agent.v1`) (438 rules / 37 tools)
|
package/README.md
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
> **Security infrastructure your AI can't be.**
|
|
10
10
|
> No matter how good your coding agent gets, it can't know the CVE published after its training cutoff, it can't deterministically guarantee the same check every run, it can't hold your whole repo in context, and it can't objectively review its own code. GuardVibe does all four — the deterministic, post-cutoff-current, whole-repo, author-independent verification layer for AI-written code.
|
|
11
11
|
|
|
12
|
-
- **🗓️ Knows what your AI doesn't.** CVE rules refreshed **daily** from GHSA / OSV.dev / CISA KEV — GuardVibe flags vulnerable dependencies published *after* your model's training cutoff. (
|
|
12
|
+
- **🗓️ Knows what your AI doesn't.** CVE rules refreshed **daily** from GHSA / OSV.dev / CISA KEV — GuardVibe flags vulnerable dependencies published *after* your model's training cutoff. (70 CVE rules, `npm run intel` daily triage.)
|
|
13
13
|
- **🎯 Deterministic, not probabilistic.** Same code = same result, every run (content-hashed). Your AI guesses; GuardVibe doesn't.
|
|
14
14
|
- **🗺️ Sees the whole repo.** Cross-file taint + auth-coverage across every route — catches the unprotected endpoint your agent's narrow context missed.
|
|
15
15
|
- **🔍 An independent second pair of eyes.** The thing that wrote the code can't review itself. GuardVibe is the outside checker on AI-written code — in the loop *while* your AI codes (real-time edit hook), not after.
|
|
16
16
|
|
|
17
|
-
**The security MCP built for vibe coding.**
|
|
17
|
+
**The security MCP built for vibe coding.** 441 security rules, 37 tools covering the entire AI-generated code journey — from first line to production deployment.
|
|
18
18
|
|
|
19
19
|
Works with **Claude Code, Cursor, Gemini CLI, Codex, VS Code (Copilot), Windsurf**, and any MCP-compatible coding agent.
|
|
20
20
|
|
|
@@ -26,11 +26,11 @@ Works with **Claude Code, Cursor, Gemini CLI, Codex, VS Code (Copilot), Windsurf
|
|
|
26
26
|
|
|
27
27
|
Most security tools are built for enterprise security teams. GuardVibe is built for **you** — the developer using AI to build and ship web apps fast.
|
|
28
28
|
|
|
29
|
-
- **
|
|
29
|
+
- **441 security rules, 37 tools** purpose-built for the stacks AI agents generate
|
|
30
30
|
- **Zero setup friction** — `npx guardvibe` and you're scanning
|
|
31
31
|
- **No account required** — runs 100% locally, no API keys, no cloud
|
|
32
32
|
- **Understands your stack** — not generic SAST, but rules that know Next.js, Supabase, Stripe, Clerk, and the tools you actually use
|
|
33
|
-
- **CVE version intelligence** — detects
|
|
33
|
+
- **CVE version intelligence** — detects 70 known vulnerable package versions in package.json, refreshed every day from GHSA / OSV.dev / CISA KEV
|
|
34
34
|
- **AI agent & MCP security** — detects MCP server vulnerabilities, tool-description prompt injection (OWASP MCP Top 10), model-controlled sandbox-disable flags, excessive AI permissions, indirect prompt injection
|
|
35
35
|
- **Auto-fix suggestions** — `fix_code` tool returns concrete patches and structured edits the AI agent can apply mechanically. Coverage: hardcoded credentials → env-var migration; public-prefix LLM keys (`NEXT_PUBLIC_/VITE_/EXPO_PUBLIC_/REACT_APP_`) → prefix removal; CORS wildcards → env allowlist; `dangerouslyAllowBrowser` flags → drop; sandbox bypass flags (`unsafe`/`noSandbox`/`allowEval`) → drop; agent loops → add `maxSteps`; raw-HTML React props → `<ReactMarkdown>`; missing auth checks → insert auth guard; SQL injection → parameterized queries; missing rate limiters / CSRF / security headers → snippet templates.
|
|
36
36
|
- **Pre-commit hook** — block insecure code before it reaches your repo
|
|
@@ -61,10 +61,10 @@ GuardVibe is purpose-built for the AI coding workflow. Traditional tools are exc
|
|
|
61
61
|
| AI/LLM security (prompt injection, MCP, tool abuse) | 68 rules | Experimental/None | None |
|
|
62
62
|
| AI host security (CVE-2025-59536, CVE-2026-21852) | `guardvibe doctor` | Not supported | Not supported |
|
|
63
63
|
| Auto-fix suggestions for AI agents | `fix_code` tool | CLI autofix | Not supported |
|
|
64
|
-
| CVE version detection |
|
|
64
|
+
| CVE version detection | 70 packages, refreshed daily | Extensive | Extensive |
|
|
65
65
|
| Compliance mapping (SOC2, PCI-DSS, HIPAA) | Built-in | Paid tier | None |
|
|
66
66
|
| SARIF CI/CD export | Yes | Yes | Limited |
|
|
67
|
-
| Rule count |
|
|
67
|
+
| Rule count | 441 (focused, 68 AI-native) | 5000+ (broad) | N/A |
|
|
68
68
|
|
|
69
69
|
**When to use GuardVibe:** You're building with AI agents and want security scanning integrated into your coding workflow — no dashboard, no account, no CI setup.
|
|
70
70
|
|
|
@@ -188,7 +188,7 @@ React Native, Expo — AsyncStorage secrets, deep link token exposure, hardcoded
|
|
|
188
188
|
### Firebase
|
|
189
189
|
Firestore security rules, Firebase Admin SDK exposure, storage rules, custom token validation
|
|
190
190
|
|
|
191
|
-
### CVE Version Intelligence (
|
|
191
|
+
### CVE Version Intelligence (70 CVEs, refreshed daily)
|
|
192
192
|
**Frameworks:** Next.js (CVE-2024-34351, CVE-2024-46982, CVE-2025-29927, CVE-2026-23869, CVE-2026-44573 / 44574 / 44575 / 44578 / 44579 / 45109 May 2026 cluster), React + react-server-dom-* (CVE-2025-55182, CVE-2026-23870), Express, Hono pre-4.12.18 cluster, @vitejs/plugin-rsc, Strapi content-type-builder (CVE-2026-22599)
|
|
193
193
|
**Auth:** Clerk middleware bypass (GHSA-vqx2), Clerk `has()` org/billing/reverification bypass (GHSA-w24r), Clerk `clerkFrontendApiProxy` SSRF (CVE-2026-34076), NextAuth.js (2 CVEs), jsonwebtoken
|
|
194
194
|
**ORMs / SQL:** Drizzle SQL identifier injection (CVE-2026-39356) + Drizzle `sql.raw` interpolation (VG1073), MikroORM SQL injection (CVE-2026-44680), Prisma raw-query call-form, Kysely JSON-path traversal (CVE-2026-44635)
|
|
@@ -255,7 +255,7 @@ Malicious postinstall scripts, unpinned GitHub Actions, CI `npm` provenance / `-
|
|
|
255
255
|
|
|
256
256
|
All scanning tools support `format: "json"` for machine-readable output.
|
|
257
257
|
|
|
258
|
-
## Security Rules (
|
|
258
|
+
## Security Rules (441 rules across 25 modules)
|
|
259
259
|
|
|
260
260
|
| Category | Rules | Coverage |
|
|
261
261
|
|----------|-------|----------|
|
|
@@ -274,7 +274,7 @@ All scanning tools support `format: "json"` for machine-readable output.
|
|
|
274
274
|
| AI / LLM Security | 16 | Prompt injection, MCP SSRF, excessive agency, indirect injection |
|
|
275
275
|
| **AI Host Security** | **10** | **CVE-2025-59536 hook injection, CVE-2026-21852 base URL hijack, MCP config audit** |
|
|
276
276
|
| **AI Tool Runtime** | **4** | **MCP tool output sanitization, obfuscated descriptions, safety bypass** |
|
|
277
|
-
| CVE Version Intelligence |
|
|
277
|
+
| CVE Version Intelligence | 30 | Known vulnerable versions in package.json — incl. React Router 7 cluster (CVE-2026-33245/42211/42342), DOMPurify XSS (CVE-2026-47423), Better Auth bypass (CVE-2026-45337), Axios supply-chain backdoor, Clerk middleware bypass (GHSA-vqx2) |
|
|
278
278
|
| Shell / Bash | 5 | Pipe to bash, chmod 777, rm -rf, sudo password |
|
|
279
279
|
| SQL | 4 | DROP/DELETE without WHERE, stacked queries, GRANT ALL |
|
|
280
280
|
| Supply Chain | 16 | Malicious install scripts, lockfile integrity, dependency confusion, typosquat detection |
|
|
@@ -781,4 +781,40 @@ export const cveVersionRules = [
|
|
|
781
781
|
fixCode: '// package.json\n"tinymce": "^8.5.1" // or "^7.9.3" for v7\n\n// Sanitize editor output before persisting/rendering\nimport DOMPurify from "isomorphic-dompurify";\n' + 'const clean = DOMPurify.sanitize(editorHtml);',
|
|
782
782
|
compliance: ["SOC2:CC7.1", "PCI-DSS:Req6.5.7"],
|
|
783
783
|
},
|
|
784
|
+
{
|
|
785
|
+
id: "VG1085",
|
|
786
|
+
name: "DOMPurify XSS via selectedcontent re-clone (CVE-2026-47423 / GHSA-87xg-pxx2-7hvx)",
|
|
787
|
+
severity: "high",
|
|
788
|
+
owasp: "A02:2025 Injection",
|
|
789
|
+
description: "dompurify 3.4.4 can be bypassed via a `<selectedcontent>` re-clone, allowing crafted markup to survive sanitization and execute as XSS. DOMPurify is the go-to HTML sanitizer for user-generated content, so a vulnerable pin silently reopens the exact XSS hole it was added to close. Only 3.4.4 is affected; 3.4.5 fixes it (a caret/tilde range resolves to the fixed patch and is not flagged).",
|
|
790
|
+
pattern: /["']dompurify["']\s*:\s*["']=?3\.4\.4["']/g,
|
|
791
|
+
languages: ["json"],
|
|
792
|
+
fix: "Upgrade dompurify to 3.4.5+: npm install dompurify@latest. Keep sanitizing on the server side too — never trust client-only sanitization for stored content.",
|
|
793
|
+
fixCode: '// package.json\n"dompurify": "^3.4.5" // or latest',
|
|
794
|
+
compliance: ["SOC2:CC7.1", "PCI-DSS:Req6.5.7"],
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
id: "VG1086",
|
|
798
|
+
name: "React Router 7 multi-CVE cluster — XSS / deserialization RCE / DoS (CVE-2026-33245 / 42211 / 42342 / 34077)",
|
|
799
|
+
severity: "high",
|
|
800
|
+
owasp: "A08:2025 Software and Data Integrity Failures",
|
|
801
|
+
description: "react-router 7.0.0–7.14.x (and @remix-run/server-runtime 2.10.0–2.17.4) ship a cluster of server-side vulnerabilities: XSS via `javascript:` targets in RSC redirect handling, unauthenticated RCE via the vendored turbo-stream v2 TYPE_ERROR deserialization (arbitrary constructor invocation), and two denial-of-service vectors (unbounded path expansion in the `__manifest` endpoint and reflected input in single-fetch). React Router 7 powers a large share of modern React/Remix apps. Fixed across the 7.13.2–7.15.0 line (use 7.15.0+) and @remix-run/server-runtime 2.17.5+. Exact and tilde pins in the affected range are flagged; a caret range resolves to a fixed release.",
|
|
802
|
+
pattern: /(?:["']react-router["']\s*:\s*["'](?:=|~)?7\.(?:[0-9]|1[0-4])\.\d+["']|["']@remix-run\/server-runtime["']\s*:\s*["'](?:=|~)?2\.(?:1[0-6]\.\d+|17\.[0-4])["'])/g,
|
|
803
|
+
languages: ["json"],
|
|
804
|
+
fix: "Upgrade react-router to 7.15.0+ (npm install react-router@latest) and @remix-run/server-runtime to 2.17.5+. After upgrading, reject non-http(s) redirect targets and keep request size/path limits in front of the app.",
|
|
805
|
+
fixCode: '// package.json\n"react-router": "^7.15.0"\n// or, for Remix:\n"@remix-run/server-runtime": "^2.17.5"',
|
|
806
|
+
compliance: ["SOC2:CC7.1", "PCI-DSS:Req6.5.1"],
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: "VG1087",
|
|
810
|
+
name: "Better Auth device-authorization approval bypass (CVE-2026-45337 / GHSA-cq3f-vc6p-68fh)",
|
|
811
|
+
severity: "high",
|
|
812
|
+
owasp: "A07:2025 Identification and Authentication Failures",
|
|
813
|
+
description: "better-auth 1.6.0–1.6.10 lets the device-authorization approve/deny endpoints accept ANY authenticated session while a user code is pending, so an attacker who gets a victim signed in can have their own device-login flow approved against the victim's account. Better Auth is increasingly common in Next.js / AI-app stacks. Fixed in 1.6.11 (a caret/tilde range resolves to the fixed patch and is not flagged).",
|
|
814
|
+
pattern: /["']better-auth["']\s*:\s*["']=?1\.6\.(?:[0-9]|10)["']/g,
|
|
815
|
+
languages: ["json"],
|
|
816
|
+
fix: "Upgrade better-auth to 1.6.11+: npm install better-auth@latest. Verify device-authorization approval is bound to the session that initiated the user code.",
|
|
817
|
+
fixCode: '// package.json\n"better-auth": "^1.6.11" // or latest',
|
|
818
|
+
compliance: ["SOC2:CC6.6", "PCI-DSS:Req6.5.10"],
|
|
819
|
+
},
|
|
784
820
|
];
|
|
@@ -3,6 +3,7 @@ import { owaspRules } from "../data/rules/index.js";
|
|
|
3
3
|
import { loadConfig } from "../utils/config.js";
|
|
4
4
|
import { loadIgnoreFile, isIgnored } from "../utils/ignore.js";
|
|
5
5
|
import { securityBanner } from "../utils/banner.js";
|
|
6
|
+
import { looksMinified } from "../utils/constants.js";
|
|
6
7
|
/** CVE version-pin rule IDs are VG900-VG931 (and only these). Other VG9xx IDs
|
|
7
8
|
* (VG983 Turso, VG990 SVG, VG998 OpenAI browser flag, etc.) are regular code-pattern
|
|
8
9
|
* rules and should NOT be exempted from comment / string-literal skip logic. */
|
|
@@ -873,6 +874,25 @@ export function analyzeCode(code, language, framework, filePath, configDir, rule
|
|
|
873
874
|
continue;
|
|
874
875
|
}
|
|
875
876
|
}
|
|
877
|
+
// VG120 (SSRF via User-Controlled URL): the regex flags `fetch(variable)` for any
|
|
878
|
+
// bare identifier, so it over-fires on constant/config endpoints. Safely skip the
|
|
879
|
+
// cases that are provably NOT request-controlled: a minified bundle (not real
|
|
880
|
+
// source; taint already skips these), or a URL variable assigned from a literal
|
|
881
|
+
// https:// constant or process.env (incl. an env default parameter). Template URLs
|
|
882
|
+
// built from a constant *base var* (`${apiBase}/path`) and method-returned URLs
|
|
883
|
+
// need real dataflow to classify and are deliberately LEFT for the AST engine —
|
|
884
|
+
// narrowing them by regex would risk hiding a genuine SSRF. `new URL(...)` is NOT
|
|
885
|
+
// treated as safe (it may wrap user input).
|
|
886
|
+
if (rule.id === "VG120") {
|
|
887
|
+
if (looksMinified(code))
|
|
888
|
+
continue;
|
|
889
|
+
const v = match[0].match(/\(\s*([A-Za-z_$]\w*)\s*[,)]/)?.[1];
|
|
890
|
+
if (v) {
|
|
891
|
+
const safeOrigin = new RegExp(`\\b${v}\\s*=\\s*(?:["'\\\`]https?:\\/\\/|process\\.env\\b)`);
|
|
892
|
+
if (safeOrigin.test(code))
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
876
896
|
// Skip matches on comment lines and inside string literals.
|
|
877
897
|
// CVE version-pin rules (VG900-VG931) are exempt — they scan package.json
|
|
878
898
|
// dependency declarations where these contexts don't apply.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardvibe",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"mcpName": "io.github.goklab/guardvibe",
|
|
5
|
-
"description": "Security infrastructure your AI can't be — deterministic, current past your model's training cutoff, whole-repo-aware, author-independent. Security MCP for vibe coding.
|
|
5
|
+
"description": "Security infrastructure your AI can't be — deterministic, current past your model's training cutoff, whole-repo-aware, author-independent. Security MCP for vibe coding. 441 rules, 37 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis. 70 CVE rules refreshed daily from GHSA/OSV/CISA KEV — React Router 7 cluster, DOMPurify XSS, Better Auth bypass, Miasma @redhat-cloud-services compromise, Next.js May 2026 13-advisory cluster, Drizzle/MikroORM/Kysely SQL injection, Axios proxy-auth redirect leak, Hono setCookie attribute injection, Clerk SSRF, tRPC prototype pollution, @tanstack supply-chain, node-ipc protestware, OpenClaude sandbox bypass, plus the full AI-generated stack (Supabase, Stripe, Prisma, Hono, GraphQL, Convex, Turso, Uploadthing, AI SDK). 68 AI-native rules including OWASP MCP Top 10 tool-description prompt injection (VG1068), model-controlled sandbox-disable flag detection (VG1063), Session messenger exfil endpoint IOC (VG1075), and CI/CD supply-chain hardening (VG1070 npm --expect-provenance / --ignore-scripts enforcement).",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"guardvibe": "build/cli.js",
|