guardvibe 0.9.0 → 0.9.2

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.
Files changed (2) hide show
  1. package/README.md +137 -112
  2. package/package.json +26 -5
package/README.md CHANGED
@@ -1,25 +1,57 @@
1
1
  # GuardVibe
2
2
 
3
- **Local-first security MCP for vibe coding.** GuardVibe gives Cursor, Claude, Gemini, Codex, and other MCP-capable coding agents fast security guardrails while they generate code.
3
+ **The security MCP built for vibe coding.** 120 security rules covering the entire vibe coder journey from first line of code to production deployment.
4
4
 
5
- GuardVibe is intentionally hard-focused on the stacks AI agents reach for most often in vibe coding workflows: **TypeScript, JavaScript, Python, Go, Dockerfile, YAML, and Terraform**. It skips legacy language packs so the MCP stays smaller, faster, and more consistent.
5
+ Works with **Claude Code, Cursor, Gemini CLI, Codex, Windsurf**, and any MCP-compatible coding agent.
6
6
 
7
7
  ## Why GuardVibe
8
8
 
9
- - **Hard-focused on vibe coding stacks** instead of trying to scan every language badly
10
- - **40+ security patterns** across application code, infra, CI, and containers
11
- - **Dependency CVE checks** via Google's OSV database
12
- - **Secret detection** with pattern matching, entropy checks, and `.gitignore` coverage
13
- - **Filesystem-native scanning** for full projects, staged files, compliance, and SARIF export
14
- - **Project-level config** with `.guardviberc`
15
- - **Security docs for agent workflows** covering modern web and API topics
9
+ 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.
16
10
 
17
- ## Supported Surface
11
+ - **120 security rules** purpose-built for the stacks AI agents generate
12
+ - **Zero setup friction** — `npx guardvibe` and you're scanning
13
+ - **No account required** — runs 100% locally, no API keys, no cloud
14
+ - **Understands your stack** — not generic SAST, but rules that know Next.js, Supabase, Stripe, Clerk, and the tools you actually use
15
+ - **Agent-friendly output** — JSON format for AI agents, Markdown for humans, SARIF for CI/CD
16
+ - **Plugin system** — extend with community or premium rule packs
18
17
 
19
- - Languages: `typescript`, `javascript`, `python`, `go`
20
- - Infra and config: `dockerfile`, `yaml`, `terraform`
21
- - Supporting files: `html`, `sql`, `shell`
22
- - Dependency manifests: `package.json`, `package-lock.json`, `requirements.txt`, `go.mod`
18
+ ## What GuardVibe Scans
19
+
20
+ ### Application Code
21
+ Next.js App Router, Server Actions, Server Components, React, Express, FastAPI, Go
22
+
23
+ ### Authentication
24
+ Clerk, Auth.js (NextAuth), Supabase Auth — middleware checks, secret exposure, session handling
25
+
26
+ ### Database
27
+ Supabase (RLS, anon vs service role), Prisma (raw query injection), Drizzle (SQL injection)
28
+
29
+ ### Payments
30
+ Stripe (webhook signatures, secret keys, client-side pricing), Polar.sh, LemonSqueezy
31
+
32
+ ### Third-Party Services
33
+ Resend (email injection), Upstash Redis, Pinecone, PostHog, Google Analytics (PII tracking)
34
+
35
+ ### AI API Keys
36
+ OpenAI, Anthropic, Google AI — client exposure, hardcoded keys, NEXT_PUBLIC leaks
37
+
38
+ ### Deployment & Config
39
+ Vercel (vercel.json, cron secrets, headers), Next.js config, Docker, Docker Compose, Fly.io, Render, Netlify, Cloudflare
40
+
41
+ ### Infrastructure
42
+ Dockerfile security, GitHub Actions CI/CD, Terraform (S3, IAM, RDS, security groups)
43
+
44
+ ### Secrets & Environment
45
+ API keys (AWS, GitHub, Stripe, OpenAI, Resend), .env management, .gitignore coverage, high-entropy detection, NEXT_PUBLIC exposure
46
+
47
+ ### Webhooks
48
+ Signature verification for Stripe, LemonSqueezy, and generic webhook endpoints
49
+
50
+ ### SEO & Web
51
+ Open redirects, robots.txt exposure, source maps, meta tag injection
52
+
53
+ ### Compliance
54
+ SOC2, PCI-DSS, HIPAA control mapping with compliance reports
23
55
 
24
56
  ## Quick Start
25
57
 
@@ -27,9 +59,8 @@ GuardVibe is intentionally hard-focused on the stacks AI agents reach for most o
27
59
 
28
60
  ```bash
29
61
  npx guardvibe init claude
30
- npx guardvibe init gemini
31
62
  npx guardvibe init cursor
32
- npx guardvibe init all
63
+ npx guardvibe init gemini
33
64
  ```
34
65
 
35
66
  ### Manual MCP setup
@@ -40,7 +71,7 @@ npx guardvibe init all
40
71
  claude mcp add guardvibe -- npx guardvibe
41
72
  ```
42
73
 
43
- **Gemini CLI** or **Cursor / VS Code**
74
+ **Cursor / VS Code / Gemini CLI**
44
75
 
45
76
  ```json
46
77
  {
@@ -53,107 +84,86 @@ claude mcp add guardvibe -- npx guardvibe
53
84
  }
54
85
  ```
55
86
 
56
- ## Tools
57
-
58
- ### `check_code`
59
-
60
- Analyze a single snippet for security issues.
61
-
62
- ```text
63
- Input: { code: string, language: "javascript"|"typescript"|"python"|"go"|"dockerfile"|"html"|"sql"|"shell"|"yaml"|"terraform", framework?: string }
64
- Output: Security report with findings, severity, OWASP mapping, and fix suggestions
65
- ```
66
-
67
- ### `check_project`
68
-
69
- Scan multiple in-memory files and return a project security score.
70
-
71
- ```text
72
- Input: { files: [{ path: "src/app.ts", content: "..." }, ...] }
73
- Output: Project report with score, summary, and per-file findings
74
- ```
75
-
76
- ### `get_security_docs`
77
-
78
- Return best practices for framework or vulnerability topics.
79
-
80
- ```text
81
- Input: { topic: "nextjs csrf" | "express authentication" | "sql injection" | ... }
82
- Output: Markdown guide with examples
83
- ```
84
-
85
- ### `scan_staged`
86
-
87
- Scan git-staged files before commit.
87
+ ## Tools (11 MCP tools)
88
88
 
89
- ```text
90
- Input: {}
91
- Output: Pre-commit report with A-F security score
92
- ```
89
+ | Tool | What it does |
90
+ |------|-------------|
91
+ | `check_code` | Analyze a code snippet for security issues |
92
+ | `check_project` | Scan multiple files with security scoring (A-F) |
93
+ | `scan_directory` | Scan a project directory from disk |
94
+ | `scan_staged` | Pre-commit scan of git-staged files |
95
+ | `scan_dependencies` | Check all dependencies for known CVEs (OSV) |
96
+ | `scan_secrets` | Detect leaked secrets, API keys, tokens |
97
+ | `check_dependencies` | Check individual packages against OSV |
98
+ | `check_package_health` | Typosquat detection, maintenance status, adoption metrics |
99
+ | `compliance_report` | SOC2 / PCI-DSS / HIPAA compliance mapping |
100
+ | `export_sarif` | SARIF v2.1.0 export for CI/CD integration |
101
+ | `get_security_docs` | Security best practices and guides |
93
102
 
94
- ### `scan_directory`
103
+ All scanning tools support `format: "json"` for machine-readable output.
95
104
 
96
- Scan a project directory directly from disk.
105
+ ## Security Rules (120 rules)
97
106
 
98
- ```text
99
- Input: { path: ".", recursive?: true, exclude?: ["fixtures"] }
100
- Output: Directory security report with score, summary, and detailed findings
101
- ```
107
+ | Category | Rules | Coverage |
108
+ |----------|-------|----------|
109
+ | Core OWASP | 20 | SQL injection, XSS, CSRF, command injection, eval, CORS, SSRF |
110
+ | Next.js App Router | 12 | Server Actions, secret exposure, auth bypass, redirects |
111
+ | Auth (Clerk / Auth.js) | 7 | Middleware, secret keys, session storage, role checks |
112
+ | Database (Supabase / Prisma / Drizzle) | 7 | Raw queries, client exposure, service role leaks |
113
+ | Deployment Config | 16 | Vercel, Next.js config, Docker Compose, Fly, Render, Netlify |
114
+ | Payments (Stripe / Polar / Lemon) | 9 | Webhook signatures, key exposure, price manipulation |
115
+ | Services (Resend / Upstash / Pinecone / PostHog) | 11 | API key leaks, PII tracking, email injection |
116
+ | Web Security (Webhooks / SEO / Env / AI Keys) | 14 | Signature verification, .env safety, AI key exposure |
117
+ | Go | 10 | SQL injection, command injection, template escaping |
118
+ | Dockerfile | 5 | Root user, secrets in ENV, untagged images |
119
+ | CI/CD (GitHub Actions) | 4 | Secrets interpolation, unpinned actions |
120
+ | Terraform | 5 | Public S3, open security groups, IAM wildcards |
102
121
 
103
- ### `scan_dependencies`
104
-
105
- Parse a supported manifest and batch-check dependencies for known CVEs.
106
-
107
- ```text
108
- Input: { manifest_path: "package-lock.json" }
109
- Supported: package.json, package-lock.json, requirements.txt, go.mod
110
- Output: Vulnerability report with normalized severity and fix versions
111
- ```
122
+ ## Plugin System
112
123
 
113
- ### `scan_secrets`
124
+ Extend GuardVibe with custom or community rule packs.
114
125
 
115
- Detect leaked secrets in source and config files.
126
+ **Install a plugin:**
116
127
 
117
- ```text
118
- Input: { path: ".", recursive?: true }
119
- Output: Secret scan report with provider identification, entropy detection, and .gitignore coverage checks
128
+ ```bash
129
+ npm install guardvibe-rules-awesome
120
130
  ```
121
131
 
122
- ### `compliance_report`
132
+ Plugins matching `guardvibe-rules-*`, `@guardvibe/rules-*`, or `@guardvibe-pro/rules-*` are discovered automatically.
123
133
 
124
- Map findings to `SOC2`, `PCI-DSS`, `HIPAA`, or `all`.
134
+ **Manual plugin config (.guardviberc):**
125
135
 
126
- ```text
127
- Input: { path: ".", framework: "SOC2" | "PCI-DSS" | "HIPAA" | "all" }
128
- Output: Findings grouped by compliance control
136
+ ```json
137
+ {
138
+ "plugins": ["guardvibe-rules-awesome", "./my-custom-rules.js"]
139
+ }
129
140
  ```
130
141
 
131
- ### `export_sarif`
132
-
133
- Export directory findings as SARIF v2.1.0.
134
-
135
- ```text
136
- Input: { path: "." }
137
- Output: SARIF JSON for GitHub Code Scanning and compatible platforms
138
- ```
142
+ **Create a plugin:**
139
143
 
140
- ### `check_dependencies`
144
+ ```typescript
145
+ import type { GuardVibePlugin } from "guardvibe/plugins";
141
146
 
142
- Check individual packages directly against OSV.
147
+ const plugin: GuardVibePlugin = {
148
+ name: "my-rules",
149
+ version: "1.0.0",
150
+ rules: [
151
+ {
152
+ id: "CUSTOM001",
153
+ name: "My Custom Rule",
154
+ severity: "high",
155
+ owasp: "A01:2025 Broken Access Control",
156
+ description: "Description of what this detects",
157
+ pattern: /vulnerable_pattern/g,
158
+ languages: ["javascript", "typescript"],
159
+ fix: "How to fix it",
160
+ },
161
+ ],
162
+ };
143
163
 
144
- ```text
145
- Input: { packages: [{ name: "lodash", version: "4.17.20", ecosystem: "npm" }] }
146
- Output: Vulnerability report with CVE IDs, severity, and fix guidance
164
+ export default plugin;
147
165
  ```
148
166
 
149
- ## Coverage
150
-
151
- - Web/API issues: auth gaps, SQL injection, command injection, XSS, CORS, SSRF, weak hashing
152
- - Containers: root user, unpinned images, secret leakage, unsafe Dockerfile patterns
153
- - CI/CD: GitHub Actions permissions, unpinned actions, risky event triggers
154
- - Terraform: public buckets, open security groups, wildcard IAM, hardcoded secrets
155
- - Secrets: AWS, GitHub, OpenAI, Stripe, private keys, `NEXT_PUBLIC_*` exposures
156
-
157
167
  ## Configuration
158
168
 
159
169
  Create a `.guardviberc` file in your project root:
@@ -169,16 +179,15 @@ Create a `.guardviberc` file in your project root:
169
179
  "scan": {
170
180
  "exclude": ["fixtures/", "coverage/"],
171
181
  "maxFileSize": 1048576
172
- }
182
+ },
183
+ "plugins": ["guardvibe-rules-awesome"]
173
184
  }
174
185
  ```
175
186
 
176
- ## Suppression
177
-
178
- GuardVibe supports inline suppression comments:
187
+ ## Inline Suppression
179
188
 
180
189
  ```javascript
181
- const password = process.env.DB_PASSWORD; // guardvibe-ignore VG001
190
+ const key = process.env.API_KEY; // guardvibe-ignore VG001
182
191
 
183
192
  // guardvibe-ignore-next-line VG002
184
193
  app.get("/api/health", (req, res) => res.json({ ok: true }));
@@ -186,16 +195,32 @@ app.get("/api/health", (req, res) => res.json({ ok: true }));
186
195
 
187
196
  Supports `//`, `#`, and `<!-- -->` comment styles.
188
197
 
189
- ## Development
198
+ ## How It Works
190
199
 
191
- ```bash
192
- git clone https://github.com/goklab/guardvibe.git
193
- cd guardvibe
194
- npm install
195
- npm run build
196
- npm test
200
+ GuardVibe runs as an MCP server that your AI coding agent connects to. When the agent generates code, it can ask GuardVibe to scan it for security issues before committing.
201
+
202
+ ```
203
+ You write code with AI
204
+
205
+ AI agent calls GuardVibe MCP tools
206
+
207
+ GuardVibe scans locally (no cloud, no API)
208
+
209
+ Returns findings with severity, OWASP mapping, and fix suggestions
210
+
211
+ AI agent fixes issues before they reach production
197
212
  ```
198
213
 
214
+ ## Performance
215
+
216
+ Tested on a real 644-file Next.js + Supabase project:
217
+
218
+ - Scan time: **502ms**
219
+ - False positive rate: **near zero** (validated against production codebase)
220
+ - Detection rate: **100%** on known vulnerability patterns
221
+
199
222
  ## License
200
223
 
201
- MIT
224
+ MIT — open source and free to use. Built by [GokLab](https://github.com/goklab).
225
+
226
+ Premium rule packs and advanced features available at [guardvibe.dev](https://guardvibe.dev) (coming soon).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "0.9.0",
4
- "description": "Local-first security MCP for vibe coding. Focused on TypeScript, JavaScript, Python, Go, Dockerfile, YAML, and Terraform.",
3
+ "version": "0.9.2",
4
+ "description": "Security MCP for vibe coding. 120 rules for Next.js, Supabase, Stripe, Clerk, Prisma, Vercel, and the full AI-generated web app stack.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "guardvibe": "build/index.js",
@@ -27,14 +27,35 @@
27
27
  "vibe-coding",
28
28
  "owasp",
29
29
  "vulnerability",
30
- "gemini",
31
30
  "claude",
32
31
  "cursor",
32
+ "gemini",
33
+ "codex",
34
+ "windsurf",
33
35
  "ai-security",
34
- "code-audit"
36
+ "code-audit",
37
+ "nextjs",
38
+ "supabase",
39
+ "stripe",
40
+ "clerk",
41
+ "prisma",
42
+ "drizzle",
43
+ "vercel",
44
+ "sast",
45
+ "secret-detection",
46
+ "webhook-security",
47
+ "compliance"
35
48
  ],
36
- "author": "GuardVibe",
49
+ "author": "GokLab",
37
50
  "license": "MIT",
51
+ "homepage": "https://github.com/goklab/guardvibe#readme",
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/goklab/guardvibe.git"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/goklab/guardvibe/issues"
58
+ },
38
59
  "dependencies": {
39
60
  "@modelcontextprotocol/sdk": "^1.26.0",
40
61
  "zod": "^3.25.0"