guardvibe 3.0.31 → 3.0.32
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.
|
@@ -335,6 +335,15 @@ export function analyzeCode(code, language, framework, filePath, configDir, rule
|
|
|
335
335
|
const isWebhookRoute = filePath && /webhook/i.test(filePath);
|
|
336
336
|
const isCronRoute = filePath && /(?:cron|scheduled|jobs?)\//i.test(filePath);
|
|
337
337
|
const isAdminRoute = filePath && /\/admin\//i.test(filePath);
|
|
338
|
+
// Skip rate-limit rules when the file installs a global rate limiter via app.use().
|
|
339
|
+
// Covers `app.use(rateLimit({...}))`, `app.use(limiter)`, `app.use('/api', rateLimit({...}))`,
|
|
340
|
+
// and named middleware vars matching limiter naming conventions.
|
|
341
|
+
if (rateLimitRuleIds.has(rule.id)) {
|
|
342
|
+
const hasGlobalRateLimit = /(?:app|router)\.use\s*\(\s*(?:[^,)]*,\s*)?(?:rateLimit|slowDown|expressRateLimit|expressSlowDown|RateLimit|Throttle|throttle)\s*\(/i.test(code) ||
|
|
343
|
+
/(?:app|router)\.use\s*\(\s*(?:[^,)]*,\s*)?\w*(?:[Ll]imiter|[Tt]hrottle|[Rr]ate[Ll]imit|[Ss]low[Dd]own|[Bb]rute)\w*\s*\)/.test(code);
|
|
344
|
+
if (hasGlobalRateLimit)
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
338
347
|
// Skip auth rules when code has any auth guard pattern (naming-agnostic)
|
|
339
348
|
if (codeHasAuthGuard && authRuleIds.has(rule.id))
|
|
340
349
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardvibe",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.32",
|
|
4
4
|
"mcpName": "io.github.goklab/guardvibe",
|
|
5
5
|
"description": "Security MCP for vibe coding. 365 rules, 36 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis. 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",
|