guardvibe 3.12.0 → 3.14.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
@@ -5,6 +5,24 @@ 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.14.0] - 2026-06-08
9
+
10
+ ### Added — intel maintenance: Vite / launch-editor dev-server RCE (441 → 442 rules / 37 tools)
11
+ - **VG1088** — vite < 5.4.9 (and the `launch-editor` < 2.9.0 it bundles) dev-server command injection on Windows (CVE-2024-52011 / GHSA-c27g-q93r-2cwf). Surfaced by `npm run intel` as the one remaining mainstream-stack gap; drafted via the S3-1 scaffold pipeline.
12
+ - **0-FP semver:** exact/`=` pins only (a caret/tilde resolves to the fixed line). Validated on the corpus: **1 true positive** (dub pins `"vite": "5.2.9"`), **0 false positives**. 8 new version-range tests.
13
+ - Counts updated everywhere (consistency guard enforces 442); CVE-rule count 70 → 71.
14
+
15
+ Gate green (build / lint / test / self-audit PASS / A / 0).
16
+
17
+ ## [3.13.0] - 2026-06-07
18
+
19
+ ### Added — Season 3 S3-3: PR-native, author-independent review (441 rules / 37 tools)
20
+ - **`guardvibe ci github --pr`** generates a `.github/workflows/guardvibe-pr-review.yml` that, on every pull request, runs a **diff-aware** scan (only the issues the PR newly introduced) and posts them as **inline review comments** on the exact file + line — the moat made visible where AI-written code lands: whole-repo aware, independent of the author, in the loop.
21
+ - Uses `actions/github-script` to create the PR review (no extra runtime dependency), with `pull-requests: write` and a graceful fallback to a summary comment if inline review can't be posted. Pinned + auto-upgraded like the existing scan workflow.
22
+ - Completes Season 3 (S3-1 autonomous/prioritized intel, S3-2 proof-carrying fixes, S3-3 PR-native review). New exported `buildGithubPrReviewWorkflow`; 6 tests. No rule or tool changes (441 / 37).
23
+
24
+ Gate green (build / lint / test / self-audit PASS / A / 0).
25
+
8
26
  ## [3.12.0] - 2026-06-07
9
27
 
10
28
  ### Added — Season 3 S3-2: proof-carrying fixes (441 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. (70 CVE rules, `npm run intel` daily triage.)
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. (71 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.** 441 security rules, 37 tools covering the entire AI-generated code journey — from first line to production deployment.
17
+ **The security MCP built for vibe coding.** 442 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
- - **441 security rules, 37 tools** purpose-built for the stacks AI agents generate
29
+ - **442 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 70 known vulnerable package versions in package.json, refreshed every day from GHSA / OSV.dev / CISA KEV
33
+ - **CVE version intelligence** — detects 71 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 | 70 packages, refreshed daily | Extensive | Extensive |
64
+ | CVE version detection | 71 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 | 441 (focused, 68 AI-native) | 5000+ (broad) | N/A |
67
+ | Rule count | 442 (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
 
@@ -150,7 +150,8 @@ npx guardvibe hook uninstall # Remove hook
150
150
  ### CI/CD (GitHub Actions)
151
151
 
152
152
  ```bash
153
- npx guardvibe ci github # Generates .github/workflows/guardvibe.yml
153
+ npx guardvibe ci github # Generates .github/workflows/guardvibe.yml (SARIF scan)
154
+ npx guardvibe ci github --pr # + a diff-aware PR review workflow that posts inline comments
154
155
  ```
155
156
 
156
157
  ## What GuardVibe Scans
@@ -188,7 +189,7 @@ React Native, Expo — AsyncStorage secrets, deep link token exposure, hardcoded
188
189
  ### Firebase
189
190
  Firestore security rules, Firebase Admin SDK exposure, storage rules, custom token validation
190
191
 
191
- ### CVE Version Intelligence (70 CVEs, refreshed daily)
192
+ ### CVE Version Intelligence (71 CVEs, refreshed daily)
192
193
  **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
194
  **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
195
  **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 +256,7 @@ Malicious postinstall scripts, unpinned GitHub Actions, CI `npm` provenance / `-
255
256
 
256
257
  All scanning tools support `format: "json"` for machine-readable output.
257
258
 
258
- ## Security Rules (441 rules across 25 modules)
259
+ ## Security Rules (442 rules across 25 modules)
259
260
 
260
261
  | Category | Rules | Coverage |
261
262
  |----------|-------|----------|
@@ -274,7 +275,7 @@ All scanning tools support `format: "json"` for machine-readable output.
274
275
  | AI / LLM Security | 16 | Prompt injection, MCP SSRF, excessive agency, indirect injection |
275
276
  | **AI Host Security** | **10** | **CVE-2025-59536 hook injection, CVE-2026-21852 base URL hijack, MCP config audit** |
276
277
  | **AI Tool Runtime** | **4** | **MCP tool output sanitization, obfuscated descriptions, safety bypass** |
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
+ | CVE Version Intelligence | 31 | Known vulnerable versions in package.json — incl. Vite dev-server cmd injection (CVE-2024-52011), React Router 7 cluster (CVE-2026-33245/42211/42342), DOMPurify XSS (CVE-2026-47423), Better Auth bypass (CVE-2026-45337), Axios supply-chain backdoor |
278
279
  | Shell / Bash | 5 | Pipe to bash, chmod 777, rm -rf, sudo password |
279
280
  | SQL | 4 | DROP/DELETE without WHERE, stacked queries, GRANT ALL |
280
281
  | Supply Chain | 16 | Malicious install scripts, lockfile integrity, dependency confusion, typosquat detection |
package/build/cli/ci.d.ts CHANGED
@@ -2,4 +2,11 @@
2
2
  * CLI: guardvibe ci <provider>
3
3
  * Generates CI/CD workflow configurations.
4
4
  */
5
+ /**
6
+ * PR-native, author-independent review workflow: on each PR, run a DIFF-AWARE scan
7
+ * (only issues newly introduced by the PR) and post them as inline review comments
8
+ * via actions/github-script — no extra runtime dependency. The moat made visible
9
+ * exactly where AI-written code lands.
10
+ */
11
+ export declare function buildGithubPrReviewWorkflow(version: string): string;
5
12
  export declare function runCi(args: string[]): void;
package/build/cli/ci.js CHANGED
@@ -45,6 +45,78 @@ jobs:
45
45
  category: guardvibe
46
46
  `;
47
47
  }
48
+ /**
49
+ * PR-native, author-independent review workflow: on each PR, run a DIFF-AWARE scan
50
+ * (only issues newly introduced by the PR) and post them as inline review comments
51
+ * via actions/github-script — no extra runtime dependency. The moat made visible
52
+ * exactly where AI-written code lands.
53
+ */
54
+ export function buildGithubPrReviewWorkflow(version) {
55
+ return `name: GuardVibe PR Review
56
+ # Pinned to guardvibe@${version}. Re-run \`npx guardvibe ci github --pr\` to upgrade.
57
+ # Diff-aware: comments only on issues this PR newly introduced (not pre-existing debt).
58
+
59
+ on:
60
+ pull_request:
61
+ branches: [main, master]
62
+
63
+ permissions:
64
+ contents: read
65
+ pull-requests: write
66
+
67
+ jobs:
68
+ guardvibe-pr-review:
69
+ name: GuardVibe PR Review
70
+ runs-on: ubuntu-latest
71
+ steps:
72
+ - uses: actions/checkout@v4
73
+ with:
74
+ fetch-depth: 0
75
+ persist-credentials: false
76
+
77
+ - uses: actions/setup-node@v4
78
+ with:
79
+ node-version: "22"
80
+
81
+ - name: GuardVibe diff-aware scan (newly-introduced issues only)
82
+ run: |
83
+ git fetch --no-tags --depth=1 origin "\${{ github.base_ref }}"
84
+ npx -y guardvibe@${version} diff "origin/\${{ github.base_ref }}" --format json --output gv-diff.json || true
85
+
86
+ - name: Post findings as PR review comments
87
+ uses: actions/github-script@v7
88
+ with:
89
+ script: |
90
+ const fs = require('fs');
91
+ let data;
92
+ try { data = JSON.parse(fs.readFileSync('gv-diff.json', 'utf8')); } catch (e) { return; }
93
+ const findings = (data.findings || []).filter(f => f.line > 0);
94
+ if (!findings.length) return;
95
+ const comments = findings.map(f => ({
96
+ path: f.file,
97
+ line: f.line,
98
+ body: '**GuardVibe ' + String(f.severity).toUpperCase() + ': ' + f.name + '** (' + f.id + ')\\n\\n' + (f.fix || '')
99
+ }));
100
+ const summary = 'GuardVibe found ' + findings.length + ' newly-introduced issue(s) in this PR.';
101
+ try {
102
+ await github.rest.pulls.createReview({
103
+ owner: context.repo.owner,
104
+ repo: context.repo.repo,
105
+ pull_number: context.issue.number,
106
+ event: 'COMMENT',
107
+ body: summary,
108
+ comments
109
+ });
110
+ } catch (e) {
111
+ await github.rest.issues.createComment({
112
+ owner: context.repo.owner,
113
+ repo: context.repo.repo,
114
+ issue_number: context.issue.number,
115
+ body: summary + ' (inline review unavailable: ' + e.message + ')'
116
+ });
117
+ }
118
+ `;
119
+ }
48
120
  /** Extract a pinned guardvibe version from a generated workflow YAML, or "latest"/null for legacy/unrecognized forms. */
49
121
  function extractPinnedVersionFromWorkflow(content) {
50
122
  const pinned = content.match(/guardvibe@(\d+\.\d+\.\d+(?:-[\w.]+)?)/);
@@ -85,14 +157,43 @@ function generateGitHubActions() {
85
157
  console.log(` [OK] Created .github/workflows/guardvibe.yml (pinned to v${pkg.version}).`);
86
158
  console.log(" [OK] SARIF results will appear in GitHub Security tab.");
87
159
  }
160
+ function generateGitHubPrReview() {
161
+ const workflowDir = join(process.cwd(), ".github", "workflows");
162
+ if (!existsSync(workflowDir))
163
+ mkdirSync(workflowDir, { recursive: true });
164
+ const workflowPath = join(workflowDir, "guardvibe-pr-review.yml");
165
+ const fresh = buildGithubPrReviewWorkflow(pkg.version);
166
+ if (existsSync(workflowPath)) {
167
+ const existingPin = extractPinnedVersionFromWorkflow(readFileSync(workflowPath, "utf-8"));
168
+ if (existingPin === pkg.version) {
169
+ console.log(` [OK] .github/workflows/guardvibe-pr-review.yml already up-to-date (pinned to v${pkg.version}).`);
170
+ return;
171
+ }
172
+ if (existingPin) {
173
+ writeFileSync(workflowPath, fresh, "utf-8");
174
+ console.log(` [OK] Updated .github/workflows/guardvibe-pr-review.yml (${existingPin} → ${pkg.version}).`);
175
+ return;
176
+ }
177
+ console.log(" [OK] .github/workflows/guardvibe-pr-review.yml exists with custom contents — leaving as-is.");
178
+ return;
179
+ }
180
+ writeFileSync(workflowPath, fresh, "utf-8");
181
+ console.log(` [OK] Created .github/workflows/guardvibe-pr-review.yml (pinned to v${pkg.version}).`);
182
+ console.log(" [OK] PRs will get inline, diff-aware GuardVibe review comments.");
183
+ }
88
184
  export function runCi(args) {
89
185
  const provider = args[0]?.toLowerCase();
186
+ const wantPr = args.includes("--pr");
90
187
  console.log(`\n GuardVibe CI/CD Setup\n`);
91
188
  if (provider === "github") {
92
189
  generateGitHubActions();
190
+ if (wantPr)
191
+ generateGitHubPrReview();
192
+ else
193
+ console.log(" [tip] Add --pr to also generate a diff-aware PR review workflow (inline comments).");
93
194
  }
94
195
  else {
95
- console.error(" [ERR] Unknown CI provider. Usage: npx guardvibe ci github");
196
+ console.error(" [ERR] Unknown CI provider. Usage: npx guardvibe ci github [--pr]");
96
197
  process.exit(1);
97
198
  }
98
199
  console.log();
package/build/cli.js CHANGED
@@ -37,7 +37,7 @@ function printUsage() {
37
37
  npx guardvibe init <platform> Setup MCP server configuration
38
38
  npx guardvibe hook install Install pre-commit security hook
39
39
  npx guardvibe hook uninstall Remove pre-commit security hook
40
- npx guardvibe ci github Generate GitHub Actions workflow
40
+ npx guardvibe ci github [--pr] Generate GitHub Actions workflow (--pr: diff-aware PR review with inline comments)
41
41
 
42
42
  Scan CLI (used by pre-commit hook and CI):
43
43
  npx guardvibe-scan Scan git-staged files
@@ -817,4 +817,16 @@ export const cveVersionRules = [
817
817
  fixCode: '// package.json\n"better-auth": "^1.6.11" // or latest',
818
818
  compliance: ["SOC2:CC6.6", "PCI-DSS:Req6.5.10"],
819
819
  },
820
+ {
821
+ id: "VG1088",
822
+ name: "Vite / launch-editor dev-server command injection on Windows (CVE-2024-52011 / GHSA-c27g-q93r-2cwf)",
823
+ severity: "high",
824
+ owasp: "A06:2025 Vulnerable and Outdated Components",
825
+ description: "vite < 5.4.9 (and the launch-editor < 2.9.0 it bundles) lets a crafted request to the running dev server inject a shell command on Windows. The dev server is commonly exposed on shared networks, so a vulnerable pin is a real RCE vector for developers/CI on Windows. Fixed in vite 5.4.9 / launch-editor 2.9.0. Only exact (or `=`) pins are flagged — a caret/tilde range resolves to a fixed release.",
826
+ pattern: /(?:["']vite["']\s*:\s*["']=?(?:[0-4]\.\d+\.\d+|5\.[0-3]\.\d+|5\.4\.[0-8])["']|["']launch-editor["']\s*:\s*["']=?(?:[01]\.\d+\.\d+|2\.[0-8]\.\d+)["'])/g,
827
+ languages: ["json"],
828
+ fix: "Upgrade vite to 5.4.9+ (or v6+): npm install -D vite@latest. If you depend on launch-editor directly, upgrade it to 2.9.0+. Never expose the dev server beyond localhost.",
829
+ fixCode: '// package.json\n"vite": "^5.4.9" // or ^6',
830
+ compliance: ["SOC2:CC7.1", "PCI-DSS:Req6.5.1"],
831
+ },
820
832
  ];
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "3.12.0",
3
+ "version": "3.14.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. 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).",
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. 442 rules, 37 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis. 71 CVE rules refreshed daily from GHSA/OSV/CISA KEV — Vite dev-server RCE, 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",