guardvibe 3.1.13 → 3.1.14

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.
@@ -247,7 +247,7 @@ export const cveVersionRules = [
247
247
  severity: "critical",
248
248
  owasp: "A02:2025 Injection",
249
249
  description: "React 19.0.0 through 19.1.0 and Next.js 15.0.0 through 15.3.2 are vulnerable to React2Shell — a critical deserialization RCE in the React Flight protocol. Attackers send crafted POST payloads to any App Router endpoint to achieve remote code execution without authentication. CVSS 10.0. State-nexus threat groups exploited this within hours of disclosure (December 2025).",
250
- pattern: /["']react["']\s*:\s*["'](?:\^|~|>=?)?\s*19\.[01]\.\d+["']/g,
250
+ pattern: /["']react["']\s*:\s*["'](?:\^|~|>=?)?\s*(?:19\.0\.\d+|19\.1\.0)["']/g,
251
251
  languages: ["json"],
252
252
  fix: "Upgrade React to 19.1.1+ and Next.js to 15.3.3+: npm install react@latest react-dom@latest next@latest",
253
253
  fixCode: '// package.json — upgrade immediately\n"react": "^19.1.1",\n"react-dom": "^19.1.1",\n"next": "^15.3.3"',
@@ -23,7 +23,7 @@ export const modernStackRules = [
23
23
  severity: "medium",
24
24
  owasp: "API3:2023 Broken Object Property Level Authorization",
25
25
  description: "Using z.any() or z.unknown() for request body/input validation effectively disables validation, allowing any data through.",
26
- pattern: /(?:body|input|data|payload|params)\s*[:=]\s*z\.(?:any|unknown)\s*\(\s*\)/gi,
26
+ pattern: /\b(?:body|input|data|payload|params)\b\s*[:=]\s*z\.(?:any|unknown)\s*\(\s*\)(?!\s*\.(?:describe|nullish|nullable|optional|catch|default|transform|pipe|refine|superRefine|brand|readonly))/gi,
27
27
  languages: ["javascript", "typescript"],
28
28
  fix: "Define explicit Zod schemas for all inputs. Use z.object() with specific field types.",
29
29
  fixCode: '// BAD: no validation\nconst schema = z.object({ data: z.any() });\n\n// GOOD: explicit validation\nconst schema = z.object({\n name: z.string().min(1).max(200),\n email: z.string().email(),\n});',
@@ -615,6 +615,8 @@ export function analyzeCode(code, language, framework, filePath, configDir, rule
615
615
  continue;
616
616
  if (isReactNative)
617
617
  continue;
618
+ if (isBatchScriptFile)
619
+ continue;
618
620
  const isEmailFile = /(?:resend|nodemailer|sendEmail|sendMail|email\.send)/i.test(code);
619
621
  if (isEmailFile)
620
622
  continue;
@@ -883,6 +885,18 @@ export function analyzeCode(code, language, framework, filePath, configDir, rule
883
885
  const isServiceVerbCall = /(?:^|[\s=])(?:return\s+|await\s+)?this\.(?:get|post|put|delete|patch|head|options|fetch|request)\s*\(/i.test(matchedLine);
884
886
  if (isServiceVerbCall && !hasSqlKeyword)
885
887
  continue;
888
+ // Bare `.get(` / `.run(` / `.all(` triggers without a SQL keyword on the line.
889
+ // The pattern's keyword list is intentionally broad to cover SQLite verbs (`db.run`,
890
+ // `db.all`) and SQLite's `.prepare(...).get()` chain, but those verbs are also used
891
+ // by Redis (`redis.get(`key:${id}`)`), Next.js cookies/headers (`req.cookies.get(`name`)`),
892
+ // JS Map (`map.get(key)`), Tinybird pipes, etc. SQLite's `prepare` already triggers
893
+ // VG010 on the ascending side of the chain, so dropping the bare-verb form here
894
+ // preserves SQLite coverage while clearing the cache/cookie/Map false positives.
895
+ const triggerWordMatch = match[0].match(/^(\w+)/);
896
+ const triggerWord = triggerWordMatch ? triggerWordMatch[1].toLowerCase() : "";
897
+ const isWeakTrigger = triggerWord === "get" || triggerWord === "run" || triggerWord === "all";
898
+ if (isWeakTrigger && !hasSqlKeyword)
899
+ continue;
886
900
  }
887
901
  // Skip XSS-family rules (VG012/VG408/VG042/VG852) when a lint-suppression
888
902
  // comment for the corresponding rule sits within a small window around the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "3.1.13",
3
+ "version": "3.1.14",
4
4
  "mcpName": "io.github.goklab/guardvibe",
5
5
  "description": "Security MCP for vibe coding. 390 rules, 36 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis, +25 AI-native rules (MCP supply-chain, RAG/vector poisoning, agent loop DoS, public-prefix LLM keys, sandbox bypass). Plus Next.js, Supabase, Clerk, Stripe, Prisma, tRPC, Hono, GraphQL, Convex, Turso, Uploadthing, AI SDK, and the full AI-generated stack.",
6
6
  "type": "module",