
Guardvibe
io.github.goklab由 GitHub 帳號 goklab 發布v3.72.0更新於 Nov 8, 2026
Deterministic security layer your AI can't be. 654 rules, 39 tools, CLI + doctor + host audit.
概覽
本機安全掃描器,為 AI 程式助理提供確定性的漏洞、金鑰、CVE 與設定錯誤檢查。
- 可以做什麼
- 掃描程式碼片段、檔案、目錄以及 git 暫存或變更的差異,給出嚴重度評分並匯出 SARIF
- 比對 OSV 檢查相依套件的已知 CVE,辨識仿冒套件與幻覺套件,並掃描 git 歷史中的外洩金鑰
- 稽核設定檔、部署檔、資料流與驗證覆蓋,並將結果對應到 SOC2、PCI-DSS、HIPAA 等合規框架
- 提供修正建議並套用、再驗證修正結果,產生完整稽核與修復計畫
- 稽核 AI 主機本身:MCP 設定、shell 設定檔與環境檔案中的鉤子注入和 base URL 劫持
- 在產生程式碼前,為撰寫提示詞補上安全要求
- 適用情境
- 當 AI 助理撰寫或審查應用程式碼,而你希望取得可重複、依規則的安全檢查,而非依賴模型自身判斷時使用。適合提交前檢查、PR 審查、CI 流程以及 AI 主機設定稽核。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 18 或更新版本(建議 22 LTS)。一般工具不需帳號或 API 金鑰;選用的 deep_scan 工具需要 ANTHROPIC_API_KEY 或 OPENAI_API_KEY 環境變數。相依套件 CVE 檢查會連網查詢 OSV API,其餘功能離線執行。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Guardvibe,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
GuardVibe
[npm version] [License: Apache-2.0] [Node.js CI] [npm provenance] [codecov]
Security infrastructure your AI can't be. 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.
- 🗓️ 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. (274 CVE rules,
npm run inteldaily triage.) - 🎯 Deterministic, not probabilistic. Same code = same result, every run (content-hashed). Your AI guesses; GuardVibe doesn't.
- 🗺️ Sees the whole repo. Cross-file taint + auth-coverage across every route — catches the unprotected endpoint your agent's narrow context missed.
- 🔍 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.
- ⬅️ NEW: Starts before the first line of code. Every scanner on earth — including your agent reviewing itself — acts after the code exists.
secure_promptacts before: it analyzes the coding prompt itself, detects the stack and attack surfaces it implies, and embeds severity-ranked GuardVibe requirements into the prompt your AI executes. The vulnerability is prevented, not caught. Deterministic, zero LLM calls — and if the prompt is already secure, it passes through untouched.
The security MCP built for vibe coding. 649 security rules, 39 tools covering the entire AI-generated code journey — from the prompt itself to production deployment.
Works with Claude Code, Cursor, Gemini CLI, Codex, VS Code (Copilot), Windsurf, and any MCP-compatible coding agent.
Why a tool, when your AI is so good?
"More rules" was never the moat — a strong model already knows most security rules by heart. What it can't do is be deterministic, know the CVE published after its training cutoff, hold your whole repo in context, or objectively review the code it just wrote. Those four gaps are structural; they don't close as models improve. GuardVibe is the layer that fills them — running while your AI codes, not in a separate audit later. And since v3.19, it runs before your AI codes too: secure_prompt rewrites the task itself so the security requirements are in the prompt, not in the post-mortem.
Why GuardVibe
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.
- 649 security rules, 39 tools purpose-built for the stacks AI agents generate
- Zero setup friction —
npx guardvibeand you're scanning - No account required — runs 100% locally, no API keys, no cloud
- Understands your stack — not generic SAST, but rules that know Next.js, Supabase, Stripe, Clerk, and the tools you actually use
- CVE version intelligence — detects 274 known vulnerable package versions in package.json, refreshed every day from GHSA / OSV.dev / CISA KEV
- 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
- Auto-fix suggestions —
fix_codetool 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;dangerouslyAllowBrowserflags → drop; sandbox bypass flags (unsafe/noSandbox/allowEval) → drop; agent loops → addmaxSteps; raw-HTML React props →<ReactMarkdown>; missing auth checks → insert auth guard; SQL injection → parameterized queries; missing rate limiters / CSRF / security headers → snippet templates. - Pre-commit hook — block insecure code before it reaches your repo
- CI/CD ready — GitHub Actions workflow with SARIF upload to Security tab
- Agent-friendly output — JSON format for AI agents, Markdown for humans, SARIF for CI/CD
- Plugin system — extend with community or premium rule packs
- Taint analysis that knows sanitizers — dataflow stops at DOMPurify, escape functions and parameterized queries, so sanitized paths don't raise findings
- One score for the whole project — code, dependencies, config, secrets, auth coverage and taint analysis all count toward it
What's new
- v3.71 — @hapi/content multipart DoS, Socket.IO cluster-engine prototype pollution, nodejs-whisper command injection and obsidian-tc MCP server access-control rules
- v3.70 — Highcharts XSS and prototype pollution, decode-uri-component and joi DoS, follow-redirects header leak and node-forge certificate-check rules
- v3.69 — systeminformation command injection, RE2JS ReDoS, GraphQL Tools prototype pollution, Vue I18n XSS and graphql-scalars ReDoS rules
New CVE rules ship almost every day. Full history: CHANGELOG.md · Releases
How GuardVibe Compares
GuardVibe is purpose-built for the AI coding workflow. Traditional tools are excellent for enterprise CI/CD pipelines — GuardVibe fills a different gap.
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.
When to use traditional tools: You need deep AST analysis, enterprise dashboards, org-wide policy enforcement, or coverage across hundreds of languages.
Quick Start
Claude Code
Creates .mcp.json MCP config (pinned to current version), .claude/settings.json auto-scan hooks, and CLAUDE.md security rules. Restart Claude Code after setup.
Cursor
Creates .cursor/mcp.json and .cursorrules with security rules. Restart Cursor after setup.
Gemini CLI
Creates ~/.gemini/settings.json MCP config and GEMINI.md security rules.
Codex (OpenAI)
VS Code (GitHub Copilot)
Create .vscode/mcp.json in your project:
Note: VS Code uses
"servers", not"mcpServers".
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
All platforms at once
Pre-commit hook
CI/CD (GitHub Actions)
What GuardVibe Scans
Application Code
Next.js App Router, Server Actions, Server Components, React, Express, Hono, tRPC, GraphQL, FastAPI, Go
Authentication & Authorization
Clerk, Auth.js (NextAuth), Supabase Auth, OAuth/OIDC (state parameter, PKCE) — middleware checks, secret exposure, session handling, SSR cookie auth, admin method protection
Database & ORM
Supabase (RLS, anon vs service role), Prisma (raw query injection, CVEs), Drizzle (SQL injection — including CVE-2026-39356 identifier-injection), MikroORM (CVE-2026-44680 runtime-identifier injection), Kysely (CVE-2026-44635 JSON-path traversal), Turso/LibSQL (client exposure, SQL injection), Convex (auth bypass, internal function exposure)
Payments
Stripe (webhook signatures, replay protection, secret keys), Polar.sh, LemonSqueezy
Third-Party Services
Resend (email HTML injection), Upstash Redis, Pinecone, PostHog, Google Analytics (PII tracking), Uploadthing (auth, file type/size)
AI / LLM Security
Prompt injection detection, LLM output sinks, system prompt leaks, MCP server SSRF/path traversal/command injection, MCP tool description prompt-injection markers (OWASP MCP Top 10 alignment, VG1068), model-controlled sandbox-disable flags (dangerouslyDisableSandbox, VG1063), AI agent unrestricted shell/database access, dangerouslyAllowBrowser, missing maxTokens, agent loop without maxSteps, AI API key client exposure, indirect prompt injection via external data, RAG/vector poisoning, public-prefix LLM key leaks (NEXT_PUBLIC_*, VITE_*, EXPO_PUBLIC_*)
AI Host Security
guardvibe doctor — unified host hardening scanner detecting CVE-2025-59536 (hook injection via .claude/settings.json), CVE-2026-21852 (API key exfiltration via ANTHROPIC_BASE_URL override), MCP config audit, environment scanner, permission analysis. Supports Claude, Cursor, VS Code, Gemini, Windsurf. Host-specific remediation with platform-tailored fix steps.
OWASP API Security
BOLA/IDOR (Broken Object Level Authorization), mass assignment (spread request body, Object.assign), missing pagination, rate limiting, admin endpoint authorization, verbose error leaks
Modern Stack
Zod .passthrough() mass assignment, z.any() bypass, file upload validation, server-only import guard, webhook replay protection, CSP headers, unsafe-inline/unsafe-eval detection, cron endpoint auth
Mobile
React Native, Expo — AsyncStorage secrets, deep link token exposure, hardcoded API URLs, ATS configuration
Firebase
Firestore security rules, Firebase Admin SDK exposure, storage rules, custom token validation
CVE Version Intelligence (274 CVEs, refreshed daily)
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)
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
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)
AI ecosystem: @anthropic-ai/sdk (CVE-2026-34451 + memory tool path escape), Vercel AI SDK file-type bypass (CVE-2025-48985), LangSmith untrusted prompt manifest (CVE-2026-45134), OpenClaude sandbox bypass (CVE-2026-42074), @nyariv/sandboxjs Function.caller escape (CVE-2026-43898)
HTTP / parsing: Axios pre-1.15.2 cluster (SSRF + prototype-pollution + DoS + CRLF) + axios proxy-auth redirect leak (VG1071), Hono setCookie attribute injection (VG1072, override pinned ^4.12.21), fast-uri path traversal + host confusion (CVE-2026-6321 / 6322), fast-xml-parser CDATA injection, xmldom CDATA, protobuf.js multi-CVE cluster, undici (2 CVEs), ws
Tools / supply chain: node-ipc protestware (VG1069), Miasma @redhat-cloud-services namespace compromise IOC (VG1074), Session messenger exfil endpoint IOC (VG1075), @tanstack/* Mini Shai-Hulud (84 malicious versions, May 2026), @wdio/browserstack-service command injection (CVE-2026-25244), @babel/plugin-transform-modules-systemjs arbitrary code (CVE-2026-44728), @opentelemetry exporter-prometheus DoS (CVE-2026-44902), systeminformation Linux cmd injection (CVE-2026-44724), velocityjs prototype pollution, defu, sharp, lodash, node-fetch, tar, xml2js, crypto-js, angular-expressions RCE, i18next-http-backend, vm2 sandbox breakouts
Deployment & Config
Vercel (vercel.json, cron secrets, headers), Next.js config, Docker, Docker Compose, Fly.io, Render, Netlify, Cloudflare
Infrastructure
Dockerfile security, GitHub Actions CI/CD, Terraform (S3, IAM, RDS, security groups)
Secrets & Environment
API keys (AWS, GitHub, Stripe, OpenAI, Resend, Turso), .env management, .gitignore coverage, high-entropy detection, NEXT_PUBLIC exposure
Compliance Control Mapping
Maps security findings to SOC2, PCI-DSS, HIPAA, GDPR, ISO27001, and EU AI Act (EUAIACT) controls. Identifies which code-level vulnerabilities are relevant to specific compliance requirements. Not a substitute for professional compliance audits.
Supply Chain
Malicious postinstall scripts, unpinned GitHub Actions, CI npm provenance / --ignore-scripts hardening (VG1070), typosquat detection, node-ipc protestware versions (VG1069), Miasma @redhat-cloud-services namespace compromise IOC (VG1074, RHSB-2026-006), Session messenger exfil endpoint IOC (VG1075, filev2.getsession.org), @tanstack/* Mini Shai-Hulud mass-malware versions (May 2026), @wdio/browserstack-service command injection via git branch names (CVE-2026-25244), lockfile poisoning patterns
Prompt-Level Security (Shift Left)
Most vulnerabilities in AI-generated code are born in the prompt: "add login to my app" says nothing about password hashing, session handling, or rate limiting — so the model picks defaults, and the defaults are where the CVEs live. secure_prompt moves the security gate to before code generation: it analyzes the raw prompt, detects the stack and attack surfaces it implies, matches them against GuardVibe's rule set, and returns a directive the host LLM uses to rewrite the prompt with security requirements embedded.
This is not a prompt beautifier. It is deterministic (no LLM, no network), it never restructures intent, and its first job is do no harm: a prompt that is already specific and security-aware gets verdict NO_MOD and passes through untouched.
NO_MOD— prompt is already specific and security-aware → proceed with the original prompt unchangedLIGHT_MOD— intent is clear but security constraints are missing → inject requirements onlyHEAVY_MOD— prompt is vague and security-relevant → inject requirements + surface clarifying questions (never invent the answers)
Before (what the user typed):
After (what the host LLM executes, having applied the secure_prompt directive):
Same user intent — but the model now generates auth code with the guardrails stated up front, instead of GuardVibe catching the missing pieces after the fact.
Tools (39 MCP tools)
All scanning tools support format: "json" for machine-readable output.
Slopsquat / hallucinated-package detection
AI assistants invent package names — ~20% of AI-generated code references packages that don't exist, and attackers register those hallucinated names ("slopsquatting"). Commodity SCA scans known, published packages against vuln databases; it can't see a name that doesn't exist yet, was never installed, or was published yesterday. scan_hallucinated_packages / slopscan targets exactly that seam, at code-gen/PR time:
- Offline (deterministic, air-gapped):
phantom_import(a package imported in source but absent from everypackage.json— a classic LLM tell) and typosquats of popular packages. Statement-anchored + comment/template-aware, so example imports in docs/strings are never miscounted. - Online (opt-in, graceful degrade): npm-registry truth —
nonexistent(404), brand-new + low-download (slopsquat-registration pattern), deprecated/unmaintained.
The offline tier is also a full_audit section (online never runs inside the audit, keeping the result hash deterministic). Allowlist intentional unpublished/workspace names via .guardviberc:
Security Rules (649 rules across 25 modules)
CLI Commands
Plugin System
Extend GuardVibe with custom or community rule packs.
Plugins matching guardvibe-rules-*, @guardvibe/rules-*, or @guardvibe-pro/rules-* are discovered automatically.
Writing a Plugin
A plugin is an npm package that exports a GuardVibePlugin object:
Plugin Rule Schema
Loading Plugins
Plugins are loaded from three sources:
- Auto-discovery: Any installed npm package matching
guardvibe-rules-*or@guardvibe/rules-* - Config-specified: Packages listed in
.guardvibercpluginsarray - Local paths: Relative paths in
.guardvibercpluginsarray
Configuration
Create a .guardviberc file in your project root:
Inline Suppression
Supports //, #, and <!-- --> comment styles.
GuardVibe Scans Itself
We run GuardVibe on its own codebase as a pre-commit hook. Every commit is scanned before it reaches the repository — the same workflow GuardVibe enables for your projects.
How It Works
Performance
Tested on real AI-built projects (837 files, Next.js + Supabase + Clerk):
- Scan time: ~1.2s (837 files)
- False positive rate: near zero — context-aware detection (React Native, Supabase client/server, static innerHTML, git-aware secrets)
- Detection rate: 100% on known vulnerability patterns
- Security score: A (99/100) on production projects
Troubleshooting
MCP connection issues
If your AI agent cannot connect to GuardVibe:
- Restart your IDE/agent. MCP servers are started by the host application. After running
npx guardvibe init, restart Claude Code, Cursor, or Gemini CLI for the config to take effect. - Check the config path. Run
npx guardvibe init claudeagain and verify the output shows the correct config file location (.mcp.jsonin your project root for Claude Code,.cursor/mcp.jsonfor Cursor). - Re-run
initto upgrade. When upgrading GuardVibe, re-runnpx guardvibe init claude—.mcp.jsonis pinned to a specific version (e.g.[email protected]) at init time for fast deterministic startup. As of v3.1.2 the re-run also rewrites stale pins automatically (Upgraded GuardVibe pin (3.1.27 → 3.1.28)); since v3.1.27 the PostToolUse hook command is pinned to the same version (was@latest) and re-run upgrades a stale hook too. The same applies tonpx guardvibe hook installandnpx guardvibe ci github(since v3.1.3) — both are version-pinned at install/generate time and re-run to upgrade. - Pre-3.1.1 users won't see the auto-update banner. GuardVibe started writing a once-per-day "newer version available" notice to stderr in v3.1.1. If your install predates that, you'll never see it — run
npx -y guardvibe@latest init <host>once to bake in the latest pin and start receiving banners on subsequent sessions. - Verify Node.js version. GuardVibe requires Node.js >= 18.0.0. Check with
node --version. - Check npx cache. If you upgraded GuardVibe and the old version is cached, run
npx -y guardvibe@latestto force the latest version.
Node.js version requirements
GuardVibe requires Node.js >= 18.0.0. Earlier versions will fail with syntax errors or missing APIs. Node.js 22 LTS is recommended.
False positives
If a rule triggers on safe code:
- Inline suppression: Add
// guardvibe-ignore VG001on the same line, or// guardvibe-ignore-next-line VG001on the line above. Supports//,#, and<!-- -->comment styles. - Config exclusion: Add the rule ID to
rules.disablein.guardviberc: - Path exclusion: Add directories to
scan.excludein.guardviberc:
Pre-commit hook issues
- Hook not running: Verify the hook file exists at
.git/hooks/pre-commitand is executable (chmod +x .git/hooks/pre-commit). - Hook blocking valid commits: Use
git commit --no-verifyto skip the hook temporarily, then investigate the findings. - Removing the hook: Run
npx guardvibe hook uninstall.
Security Model
GuardVibe is designed for use on sensitive and proprietary codebases:
- 100% local execution. All scanning happens on your machine. No code, findings, or metadata are sent to any server.
- No accounts, no API keys, no telemetry. There is no signup, no cloud dashboard, and no usage tracking of any kind.
- One optional network call. The
scan_dependenciesandcheck_dependenciestools query the OSV API to check for known CVEs. This is opt-in -- you only call it when you explicitly use those tools. No other tool makes network requests. - Safe for air-gapped environments. All code analysis rules run entirely offline. Only dependency vulnerability checks require network access.
Configuration (.guardviberc)
Create a .guardviberc JSON file in your project root to customize GuardVibe behavior.
Full example
Configuration fields
Security
GuardVibe takes supply chain security seriously:
- npm provenance — every published version is cryptographically signed via Sigstore, linking the package to this exact GitHub repo and commit. Verify with
npm audit signatures - 2FA enabled — npm account protected with two-factor authentication
- Branch protection — force push disabled on main, admin enforcement enabled
- Tag protection — version tags (
v*) cannot be deleted or force-pushed - Minimal CI permissions — GitHub Actions workflows use
permissions: contents: readonly - Minimal, fully-audited runtime dependencies — only three direct dependencies: the MCP SDK, Zod, and the TypeScript compiler (used for AST-based dataflow analysis). Zod and TypeScript are zero-sub-dependency, pure-JS packages. The MCP SDK pulls a small set of widely-used, audited transitive packages (e.g.
express,cors,ajv) for its optional HTTP transport — GuardVibe itself runs over stdio. No native bindings anywhere in the tree, and all code analysis runs 100% locally and offline
To report a vulnerability, please email [email protected] or open a GitHub issue.
License
Apache 2.0 — open source, patent-safe, enterprise-ready. Built by GokLab.
來源:README.md,提交 e215f99
工具
0版本歷史
35- v3.71.3Nov 7, 2026
- v3.70.0Nov 3, 2026
- v3.69.0Nov 1, 2026
- v3.68.0Oct 31, 2026
- v3.67.0Oct 30, 2026
- v3.66.0Oct 29, 2026
- v3.65.0Oct 23, 2026
- v3.64.0Oct 22, 2026
- v3.63.0Oct 21, 2026
- v3.62.0Oct 18, 2026
- v3.61.0Oct 17, 2026
- v3.60.0Oct 16, 2026
- v3.59.0Oct 15, 2026
- v3.58.0Oct 14, 2026
- v3.57.0Oct 13, 2026
- v3.56.0Oct 12, 2026
- v3.55.0Oct 11, 2026
- v3.54.0Oct 10, 2026
- v3.53.0Oct 9, 2026
- v3.52.0Oct 8, 2026
- v3.51.0Oct 5, 2026
- v3.50.0Oct 4, 2026
- v3.48.0Oct 3, 2026
- v3.47.0Oct 2, 2026
- v3.46.0Oct 1, 2026
- v3.45.0Sep 30, 2026
- v3.44.0Sep 29, 2026
- v3.43.0Sep 29, 2026
- v3.42.0Sep 27, 2026
- v3.41.0Sep 26, 2026
- v3.38.0Sep 26, 2026
- v3.37.2Sep 25, 2026
- v3.35.1Sep 25, 2026
- v3.34.1Sep 23, 2026
- v3.31.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分