Security infrastructure your AI can't be — deterministic, daily CVE intel past your model's training cutoff, whole-repo-aware, author-independent, and shift-left: secure_prompt secures the prompt before code generation. The security MCP for vibe coding: 442 rules, 38 tools, CLI + doctor for Next.js, Supabase, Clerk, Stripe, Prisma, Hono & MCP.
Drift inferred · capture-to-capture
- HIGH code analysis flagged dynamic code execution ×2 in goklab/guardvibe
- HIGH code analysis flagged dynamic code execution ×2 in goklab/guardvibe
- HIGH code analysis flagged dynamic code execution ×2 in goklab/guardvibe
tools
-
analyze_cross_file_dataflow
Cross-file taint analysis — track tainted data across module boundaries
-
analyze_dataflow
Track tainted data flows from user input to dangerous sinks
-
audit_config
Audit project configuration files for cross-file security misconfigurations
-
audit_mcp_config
Audit MCP server configurations for hook injection, file:// abuse, sensitive paths
-
auth_coverage
Auth coverage map — enumerate routes, parse middleware matchers, detect auth guards, report coverage %
-
check_code
Analyze a code snippet for security issues
-
check_command
Analyze shell commands for security risks before execution
-
check_dependencies
Check individual packages against OSV
-
check_package_health
Typosquat detection, maintenance status, adoption metrics
-
check_project
Scan multiple files with security scoring (A-F)
-
compliance_report
Map security findings to compliance controls (SOC2, PCI-DSS, HIPAA, GDPR, ISO27001, EU AI Act)
-
deep_scan
LLM-powered deep analysis — IDOR, business logic, race conditions, auth bypass. Defaults to Claude Haiku 4.5 (~cents/scan). Pass model: 'sonnet' for deeper analysis. CLI: npx guardvibe deep-scan <file
-
explain_remediation
Get detailed remediation guidance with exploit scenarios and fix strategies
-
export_sarif
SARIF v2.1.0 export for CI/CD integration
-
fix_code
Auto-fix suggestions with concrete patches for AI agents
-
full_audit
Single source of truth — runs ALL checks in one call, returns PASS/FAIL/WARN verdict + score + coverage % + deterministic result hash
-
generate_policy
Detect project stack and generate tailored security policies (CSP, CORS, RLS)
-
get_security_docs
Security best practices and guides
-
guardvibe_doctor
Host security audit — CVE-2025-59536, CVE-2026-21852, MCP config, env scanner
-
policy_check
Check project against compliance policies defined in .guardviberc
-
remediation_plan
Remediation plan — generates section-by-section fix checklist after audit
-
repo_security_posture
Assess overall repository security posture and map sensitive areas
-
review_pr
Review PR diff for security issues with severity gating
-
scan_changed_files
Scan only git-changed files — for PRs and incremental CI
-
scan_config_change
Compare config file versions to detect security downgrades
-
scan_dependencies
Check all dependencies for known CVEs (OSV)
-
scan_directory
Scan a project directory from disk
-
scan_file
Real-time single-file scan — designed for post-edit hooks
-
scan_host_config
Scan shell profiles, .env files for base URL hijack and credential sniffing
-
scan_secrets
Detect leaked secrets, API keys, tokens
-
scan_secrets_history
Scan git history for leaked secrets (active and removed)
-
scan_staged
Pre-commit scan of git-staged files
-
security_stats
Cumulative security dashboard — scans, fixes, grade trend over time
-
security_workflow
Get recommended tool workflow for your current task (writing, pre-commit, PR review, etc.)
-
verify_fix
Verify a security fix was applied correctly — returns fixed/still_vulnerable/new_issues
-
verify_remediation
Remediation verification — compares before/after audit, flags skipped sections
analyzed commit 0ed4720 · analyzer v18 · 10h ago
skills & prompt files 1
- agent-rulesgoklab-guardvibe-0ed4720/CLAUDE.md
filesystem 37
- fs goklab-guardvibe-0ed4720/scripts/intel-check.mjs :23
import { readdirSync, readFileSync } from "node:fs"; - fs goklab-guardvibe-0ed4720/src/cli/audit.ts :6
import { writeFileSync, existsSync, mkdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/auth-coverage.ts :6
import { readdirSync, readFileSync, statSync, writeFileSync, existsSync, mkdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/ci.ts :7
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/compliance.ts :6
import { writeFileSync, existsSync, mkdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/deep-scan.ts :5
import { readFileSync, statSync } from "node:fs"; - fs goklab-guardvibe-0ed4720/src/cli/doctor.ts :6
import { writeFileSync, existsSync, mkdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/fix.ts :5
import { readFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/hook.ts :7
import { readFileSync, writeFileSync, mkdirSync, existsSync, chmodSync, unlinkSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/init.ts :7
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/scan.ts :6
import { readFileSync, writeFileSync, existsSync, mkdirSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/cli/secure-this.ts :11
import { readFileSync, writeFileSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :110
'import path from "path";\nconst ALLOWED_BASE = "/data/workspace";\nconst resolved = path.resolve(ALLOWED_BASE, args.filePath);\nif (!resolved.startsWith(ALLOWED_BASE)) throw new Error("Path traversal - fs goklab-guardvibe-0ed4720/src/data/rules/cve-versions.ts :570
'// package.json\n"@anthropic-ai/sdk": "^0.91.1" // or latest\n\n// Harden Memory Tool root (server bootstrap)\nimport { chmodSync, mkdirSync } from "node:fs";\nmkdirSync(memoryRoot, { recursive: tru - fs goklab-guardvibe-0ed4720/src/data/rules/modern-stack.ts :571
'import { randomUUID } from "crypto";\nimport path from "path";\n\n// Generate safe filename\nconst ext = path.extname(file.name).toLowerCase();\nconst ALLOWED_EXT = [".jpg", ".jpeg", ".png", ".webp", - fs goklab-guardvibe-0ed4720/src/lib/stats.ts :1
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/plugins/loader.ts :1
import { readdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/audit-config.ts :1
import { readFileSync, existsSync, readdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/audit-mcp-config.ts :1
import { readFileSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/check-command.ts :3
import { existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/compliance-report.ts :1
import { readFileSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/doctor.ts :1
import { readFileSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/export-sarif.ts :2
import { readFileSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/fix-code.ts :298
return "import path from \"path\";\nconst BASE = path.resolve(\"/data/safe\");\nconst resolved = path.resolve(BASE, userPath);\nif (!resolved.startsWith(BASE + path.sep)) throw new Error(\"Path traver - fs goklab-guardvibe-0ed4720/src/tools/full-audit.ts :13
import { readdirSync, readFileSync, statSync, existsSync } from "node:fs"; - fs goklab-guardvibe-0ed4720/src/tools/generate-policy.ts :1
import { readFileSync, existsSync, readdirSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/policy-check.ts :1
import { readFileSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/reachability.ts :19
import { readdirSync, statSync, readFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/repo-posture.ts :1
import { readdirSync, readFileSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/scan-dependencies.ts :1
import { readFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/scan-directory.ts :2
import { readFileSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/scan-host-config.ts :1
import { readFileSync, existsSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/tools/scan-secrets.ts :1
import { existsSync, readdirSync, readFileSync, statSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/utils/config.ts :1
import { readFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/utils/ignore.ts :11
import { readFileSync } from "fs"; - fs goklab-guardvibe-0ed4720/src/utils/update-check.ts :15
import { readFileSync, writeFileSync, mkdirSync } from "node:fs"; - fs goklab-guardvibe-0ed4720/src/utils/walk-directory.ts :6
import { readdirSync } from "fs";
shell / exec 13
- shell goklab-guardvibe-0ed4720/scripts/release-gate.mjs :14
import { execSync } from "node:child_process"; - shell goklab-guardvibe-0ed4720/src/cli/scan.ts :87
const { execFileSync } = await import("child_process"); - shell goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :125
'// Use spawn with argument array (no shell interpretation)\nimport { spawn } from "child_process";\nconst allowed = /^[a-zA-Z0-9._-]+$/;\nif (!allowed.test(args.filename)) throw new Error("Invalid fi - shell goklab-guardvibe-0ed4720/src/data/rules/core.ts :82
/(?:(?:child_process|cp)[\s\S]*?(?:exec|execSync|spawn|spawnSync)|\.exec(?:Sync)?\s*\(|\.spawn(?:Sync)?\s*\(|os\.system|os\.popen|subprocess\.(?:call|run|Popen)|shell_exec)\s*\(\s*(?:`[^`]*\$\{|['"][^ - shell goklab-guardvibe-0ed4720/src/data/rules/cve-versions.ts :429
"Flowise versions 3.0.5 and earlier are vulnerable to unauthenticated remote code execution via the CustomMCP node. User-supplied mcpServerConfig JavaScript is evaluated through the Function() constru - shell goklab-guardvibe-0ed4720/src/index.ts :703
const { execFileSync } = await import("child_process"); - shell goklab-guardvibe-0ed4720/src/tools/cross-file-taint.ts :368
// Bare child_process exec()/execSync() (shell-invoking). Lookbehind excludes method - shell goklab-guardvibe-0ed4720/src/tools/diff-aware.ts :12
import { execFileSync } from "child_process"; - shell goklab-guardvibe-0ed4720/src/tools/review-pr.ts :1
import { execFileSync } from "child_process"; - shell goklab-guardvibe-0ed4720/src/tools/scan-secrets-history.ts :1
import { execFileSync } from "child_process"; - shell goklab-guardvibe-0ed4720/src/tools/scan-secrets.ts :3
import { execFileSync } from "child_process"; - shell goklab-guardvibe-0ed4720/src/tools/scan-staged.ts :1
import { execFileSync } from "child_process"; - shell goklab-guardvibe-0ed4720/src/tools/taint-analysis.ts :55
// Command injection: bare child_process exec()/execSync() (the shell-invoking forms).
network 16
- net goklab-guardvibe-0ed4720/scripts/intel-check.mjs :39
const res = await fetch("https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json", { - net goklab-guardvibe-0ed4720/src/cli/init.ts :75
- Never pass user-controlled URLs to fetch() without allowlist validation - net goklab-guardvibe-0ed4720/src/data/framework-guides.ts :140
const res = await fetch(url, { - net goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :95
'// Validate URL before fetch in MCP tool\nconst allowedHosts = ["api.example.com", "cdn.example.com"];\nconst parsed = new URL(args.url);\nif (!allowedHosts.includes(parsed.hostname)) throw new Error - net goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :19
'// Sanitize external content in MCP tool response\nfunction sanitizeToolOutput(text: string): string {\n return text\n .replace(/<[^>]*>/g, "")\n .replace(/[\\x00-\\x08\\x0B-\\x1F]/g, "")\n - net goklab-guardvibe-0ed4720/src/data/rules/core.ts :448
"User-controlled input is passed directly to fetch(), axios, or http.request() as the URL. Attackers can make the server request internal services (169.254.169.254 for cloud metadata, localhost admin - net goklab-guardvibe-0ed4720/src/data/rules/cve-versions.ts :127
fix: "Upgrade node-fetch to 2.6.7+ or 3.1.1+. Consider using native fetch (Node.js 18+).", - net goklab-guardvibe-0ed4720/src/data/rules/firebase.ts :86
fixCode: '// Server-side: generate custom token\nimport { getAuth } from "firebase-admin/auth";\nconst customToken = await getAuth().createCustomToken(uid);\n\n// Client-side: only use tokens from you - net goklab-guardvibe-0ed4720/src/data/rules/react-native.ts :25
fixCode: '// Validate token from deep link server-side\nconst { token } = parseURL(url);\nconst res = await fetch("/api/verify-token", { method: "POST", body: JSON.stringify({ token }) });\nif (!res.o - net goklab-guardvibe-0ed4720/src/tools/check-code.ts :743
// Skip SSRF for fetch() calls that only use relative URLs or known-safe patterns - net goklab-guardvibe-0ed4720/src/tools/check-package-health.ts :111
fetch(`https://registry.npmjs.org/${encodeURIComponent(name)}`, { signal: AbortSignal.timeout(5000) }), - net goklab-guardvibe-0ed4720/src/tools/deep-scan.ts :227
const res = await fetch("https://api.anthropic.com/v1/messages", { - net goklab-guardvibe-0ed4720/src/tools/fix-code.ts :244
if (rule.id === "VG705") return 'import { fetch } from "react-native-ssl-pinning";\nawait fetch(url, { sslPinning: { certs: ["cert"] } });'; - net goklab-guardvibe-0ed4720/src/tools/taint-analysis.ts :269
// (`fetch(`${WEBAPP_URL}/api?${q}`)`) is not flagged — only an attacker-controlled host - net goklab-guardvibe-0ed4720/src/utils/osv-client.ts :26
const response = await fetch("https://api.osv.dev/v1/query", { - net goklab-guardvibe-0ed4720/src/utils/update-check.ts :74
const res = await fetch(NPM_URL, { signal: ctrl.signal });
secrets 21
- secrets goklab-guardvibe-0ed4720/scripts/intel-check.mjs :79
if (process.env.GITHUB_TOKEN) headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`; - secrets goklab-guardvibe-0ed4720/src/cli/deep-scan.ts :58
if (!process.env.ANTHROPIC_API_KEY && !process.env.OPENAI_API_KEY) { - secrets goklab-guardvibe-0ed4720/src/data/framework-guides.ts :105
secret: process.env.SESSION_SECRET, - secrets goklab-guardvibe-0ed4720/src/data/rules/advanced-security.ts :501
'// BAD: timing leak\nif (secret !== process.env.CRON_SECRET) return false;\n\n// GOOD: constant-time comparison\nimport { timingSafeEqual } from "crypto";\nfunction safeCompare(a: string, b: string): - secrets goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :327
'// app/api/gemini/route.ts (server-only):\nimport { GoogleGenerativeAI } from "@google/generative-ai";\nconst genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY!);\nexport async function POST( - secrets goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :217
'// SAFE — explicit origin allowlist + bearer auth:\napp.use(cors({ origin: ["http://127.0.0.1:6274", "https://app.example.com"], credentials: true }));\napp.use((req, res, next) => {\n if (req.heade - secrets goklab-guardvibe-0ed4720/src/data/rules/auth.ts :196
'// utils/supabase/server.ts\nimport { createServerClient } from "@supabase/ssr";\nimport { cookies } from "next/headers";\n\nexport async function createClient() {\n const cookieStore = await cookie - secrets goklab-guardvibe-0ed4720/src/data/rules/core.ts :15
fix: "Use environment variables (process.env.SECRET) or a secrets manager. Never commit credentials to source code.", - secrets goklab-guardvibe-0ed4720/src/data/rules/database.ts :16
'// Option 1: Service role key (admin access)\nconst supabase = createClient(\n process.env.SUPABASE_URL!,\n process.env.SUPABASE_SERVICE_ROLE_KEY!\n);\n\n// Option 2: SSR client with cookies (RLS-a - secrets goklab-guardvibe-0ed4720/src/data/rules/deployment.ts :47
'// app/api/cron/route.ts\nexport async function GET(request: Request) {\n const authHeader = request.headers.get("authorization");\n if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) {\n r - secrets goklab-guardvibe-0ed4720/src/data/rules/firebase.ts :25
fixCode: '// Server-side only (API route or Server Action)\nimport { initializeApp, cert } from "firebase-admin/app";\ninitializeApp({ credential: cert(JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT_ - secrets goklab-guardvibe-0ed4720/src/data/rules/modern-stack.ts :85
'// Add at the very top of server-only modules\nimport "server-only";\n\n// Now this file cannot be imported by Client Components\nexport async function getSecretData() {\n const key = process.env.SE - secrets goklab-guardvibe-0ed4720/src/data/rules/nextjs.ts :16
'// Move to a Server Component (no \'use client\')\nexport default async function Page() {\n const secret = process.env.SECRET_KEY;\n return <ClientComponent data={safeData} />;\n}', - secrets goklab-guardvibe-0ed4720/src/data/rules/other-services.ts :25
fixCode: '// Server-side only\nimport twilio from "twilio";\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\n// Validate phone number before sending\nconst pho - secrets goklab-guardvibe-0ed4720/src/data/rules/payments.ts :16
"// Server-side only (API route or Server Action)\nimport Stripe from 'stripe';\nconst stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);", - secrets goklab-guardvibe-0ed4720/src/data/rules/react-native.ts :111
fixCode: '// app.config.ts — only public values in extra\nexport default {\n extra: {\n apiUrl: process.env.EXPO_PUBLIC_API_URL, // OK: public\n // NEVER: apiSecret: process.env.API_SECRET\n } - secrets goklab-guardvibe-0ed4720/src/data/rules/services.ts :14
fixCode: '"use server";\nimport { Resend } from "resend";\nconst resend = new Resend(process.env.RESEND_API_KEY);', - secrets goklab-guardvibe-0ed4720/src/data/rules/web-security.ts :14
fixCode: "// Verify webhook signature\nimport crypto from 'crypto';\nconst sig = request.headers.get('x-webhook-signature');\nconst expected = crypto.createHmac('sha256', process.env.WEBHOOK_SECRET!)\ - secrets goklab-guardvibe-0ed4720/src/tools/audit-config.ts :287
fix: "Verify the authorization header against process.env.CRON_SECRET in the route handler.", - secrets goklab-guardvibe-0ed4720/src/tools/deep-scan.ts :216
const anthropicKey = process.env.ANTHROPIC_API_KEY; - secrets goklab-guardvibe-0ed4720/src/tools/fix-code.ts :117
return "// Move hardcoded value to environment variable:\nconst value = process.env.SECRET_NAME;";
database 1
- db goklab-guardvibe-0ed4720/src/data/rules/other-services.ts :61
fixCode: 'import { MongoClient } from "mongodb";\nconst client = new MongoClient(process.env.MONGODB_URI!);',
tool registrations 6
- lookup_user goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :492
- lookup_user goklab-guardvibe-0ed4720/src/data/rules/ai-security.ts :492
- fetch_page goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :19
- fetch_weather goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :120
- fetch_weather goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :120
- get_user goklab-guardvibe-0ed4720/src/data/rules/ai-tool-runtime.ts :155
declared dependencies 8
- @modelcontextprotocol/sdk@^1.26.0
- typescript@^5.7.0
- zod@^3.25.0
- @types/node@^25.5.2
- c8@^11.0.0
- eslint@^10.2.0
- tsx@^4.22.4
- typescript-eslint@^8.58.0