Repository navigation
Releases
v2.1.3
v2.1.2 — Official MCP Registry & Next.js/Supabase False-Positive Fixes
vibe-shield v2.1.2
Published on npm as @vibefoundry/vibe-shield@2.1.2 (@latest) and listed on the Official MCP Registry as io.github.avivgerz-hue/vibe-shield.
npx -y @vibefoundry/vibe-shield@latest scan .
What changed
Fewer false positives for Next.js and Supabase (#13)
- App Router handler extraction no longer lets destructured arguments hide the real handler body.
- Recognizes common auth helpers, explicit 401 guards and
with*wrapper signals, without borrowing auth from other handlers. - IDOR findings are limited to request-derived ownership fields, predicates or tracked aliases, and a narrow mismatch-and-return guard is recognized.
- The admin/destructive rule now applies to server endpoints and server actions only, not UI components.
- Unexposed server-side Supabase admin helpers are treated as legitimate, while public-prefixed secrets and client-reachable service-role clients are still reported. A bounded, best-effort client import graph follows relative imports and root tsconfig/jsconfig aliases.
Official MCP Registry metadata (#15)
- Package and metadata bumped to 2.1.2, with the npm MCP ownership marker added.
server.jsonnow follows the official schema and declares the positionalmcpargument.- README rule counts corrected: 80 code rules + 12 agent-integrity rules = 92.
- New manifest, count and official
mcp-publisher validatechecks in CI.
README (#14)
- New hero with an animated terminal demo, star callout and VibeFoundry Agent Suite links.
Notes
- This release supersedes v2.1.0, whose npm publish did not complete.
- Static auth signals and the import graph are heuristics, not proof of authorization or complete bundler reachability. Manual review is still needed. A clean score is not a security guarantee.
Vibe-Shield v2.1.0 — Browser Security Preview & CLI Star Footer
Vibe-Shield v2.1.0
Discover and share
- Human-readable
scanandaudit-skillsreports now include a GitHub star call-to-action, a working GitHub CLI shortcut, and a copyable grade badge.initshows an explicitly labeled agent-audit badge. Empty scans do not receive a badge. - JSON, SARIF, summary, GitHub annotations, and one-line
--quietoutput remain free of the promotional footer.init --jsonemits structured JSON. - A responsive, self-contained browser preview in
docs/index.htmlanalyzes pasted snippets locally or selected files from public GitHub repositories via the public REST API. It shows a preview score, heuristic attack-surface signals, findings, preview badge and sharing links.
Important limitations
The browser preview uses six lightweight heuristics, not the full 91-rule CLI engine. Public GitHub API limits, selected file types, a 60-file limit, and per-file / total size caps may produce incomplete results, which are labeled in the interface. Pasted snippets stay in the browser; repository mode contacts GitHub directly. Scores are not security certifications.
GitHub Pages must be enabled on main using the /docs source before the public preview URL is live. The npm publishing job failed, so npm 2.1.0 is not yet available and @latest still resolves to 2.0.0. The v2 action tag remains at 2.0.0 to avoid breaking existing users. The v2.1.0 action defaults to npm 2.1.0 and will not work with its default until that version is published; it offers an optional version input. The root .mcp.json remains pinned to 2.0.0.
In the meantime, use the GitHub tag to run the new CLI:
npx -y github:avivgerz-hue/vibe-shield#v2.1.0 scan .Verification
All 318 tests and six PR CI checks passed, including the Docker MCP handshake. The implicit self-scan and agent audit both scored 100/100 A+ with zero findings. Coverage and npm package dry-run passed. Browser GitHub fetching was verified against a public repository.
Vibe-Shield v2.0.0 — 8-Vector Security Engine, Attack-Surface Mapper & Universal Agent Integration
Vibe-Shield v2.0.0
Vibe-Shield is a zero-runtime-dependency, offline static security auditor for application code and agent configurations. This release adds:
- A 91-rule catalogue across eight defensive categories, covering client exposure, auth, data, AI sinks, infrastructure, dependencies, secrets/cryptography, and agent integrity.
- A heuristic attack-surface inventory, CWE and OWASP mappings, Markdown/HTML/SARIF reports, and an AI remediation prompt.
- A six-phase defensive AppSec skill, plus native setup for Claude Code, OpenCode, Codex, Cursor, Windsurf, GitHub Copilot, Cline/Roo and Zed.
- A GitHub Marketplace-ready composite action at
avivgerz-hue/vibe-shield@v2with severity gating, optional agent audit and SARIF output.
Universal agent setup
npx -y github:avivgerz-hue/vibe-shield#v2 init --agents allUse --agents claude,cursor,zed to select integrations. Existing MCP servers are preserved; malformed configuration is reported and left untouched.
GitHub Action
- uses: actions/checkout@v4
- uses: avivgerz-hue/vibe-shield@v2
with:
target: .
fail-on: high
audit-skills: 'true'
sarif-file: vibe-shield.sarifThe SARIF file can be uploaded separately using GitHub code scanning. GitHub Marketplace listing requires completing GitHub's listing flow.
npm availability
@vibefoundry/vibe-shield@2.0.0 is already published and is used by the action and pinned MCP configurations. That immutable npm artifact predates the universal --agents initializer and expanded agent-format auditing in this GitHub release. Use the GitHub v2 setup command above until those changes are published in a newer npm version.
Static findings and inventory labels are heuristic and require manual review; an A+ score is not a security guarantee. Both self-audits scored 100/100 A+ with zero findings, 308 tests passed, and all six PR CI checks passed.
v1.1.0 — Native MCP server, registry manifests, instant npx
vibe-shield is now an MCP server, and the GitHub install is instant.
Your agent can call the scanner as a tool instead of shelling out — and npx github:avivgerz-hue/vibe-shield starts in milliseconds with no TypeScript on the machine.
🔌 Native MCP server
npx vibe-shield mcp # JSON-RPC 2.0 over stdio, zero dependenciesThree tools for Claude Code, Claude Desktop, Cursor and Codex:
| Tool | What it returns |
|---|---|
vibe_shield_scan |
Grade, score and findings with exact file:line, CWE and remediation |
vibe_shield_audit_skills |
Agent-surface poisoning: exfiltration, hidden Unicode, credential reads, unpinned MCP servers |
vibe_shield_explain_rule |
Full CWE detail, vulnerable/fixed examples and remediation for any rule id or slug |
Add it to your client
npx vibe-shield init writes it for you, merging into .mcp.json without touching servers you already have:
{
"mcpServers": {
"github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"] },
"vibe-shield": { "command": "npx", "args": ["--yes", "vibe-shield@latest", "mcp"] }
}
}Or by hand:
claude mcp add vibe-shield -- npx --yes vibe-shield@latest mcpProtocol behaviour, tested rather than assumed
- Notifications are never answered; request ids are echoed, including string ids
- Requests are handled in arrival order — a slow scan cannot interleave with a later call
- Malformed JSON returns
-32700and keeps the session alive - Tool failures come back as
isErrorresults, so one bad argument degrades one call stdoutcarries protocol only — a test asserts every emitted line parses as JSON- An empty target reports
No files were scanned, never a green pass
🧩 init merges .mcp.json safely
Only adds its own mcpServers.vibe-shield key. Existing servers, unrelated top-level keys and your formatting survive. A malformed file is reported as blocked and left byte-identical — silently rewriting someone's MCP config could break every server they run, and --force cannot repair invalid JSON.
⚡ Instant zero-build npx github:
dist/ is now committed. A git install has no TypeScript with which to compile, so without it the bin path dangled and the CLI could not start.
| Before | After | |
|---|---|---|
| Git install | 6153 ms | 2644 ms |
| CLI start | required a build | 60 ms, no toolchain |
Source maps are no longer emitted, so dist/ is 641 KB / 47 files instead of 1.1 MB / 93. The committed build is reproducible — rebuilding leaves git status clean.
prepare is now non-fatal: no-op when the committed dist/ is present, warn-and-exit-0 when it is missing with no local TypeScript, compile only when it can. A non-zero exit would abort your npm install.
📇 MCP directory manifests
| File | For |
|---|---|
server.json |
Official MCP registry (schema 2025-12-11, reverse-DNS name) |
smithery.yaml |
Smithery crawlers — the commandFunction is validated by executing it |
glama.json |
Glama directory, listing all three tools |
📚 Citation
CITATION.cff (1.2.0) is in place, so GitHub now shows the "Cite this repository" widget. Author VibeFoundry, URL https://github.com/avivgerz-hue/vibe-shield.
@software{vibeshield,
title = {vibe-shield: a security scanner and MCP guard for AI-generated code},
author = {VibeFoundry},
year = {2026},
version = {1.1.0},
url = {https://github.com/avivgerz-hue/vibe-shield},
license = {MIT}
}🔎 SEO
keywords 20 → 43, covering mcp-server, model-context-protocol, ai-security, supabase-rls, nextjs-security, secret-scanner, code-scanning and the rest of the intent list.
✅ Verification
- 224 tests (was 175) across 5 files — new
mcp.test.ts(30) anddistribution.test.ts(16) - Self-scan and self-audit both A+ 100/100
- CI green on Node 18 / 20 / 22 / 24
- Fresh clone of
mainruns the CLI with no build step - Packed tarball installed clean:
version→1.1.0, MCP handshake → 3 tools
Upgrade
npx vibe-shield@1.1.0 init --force # adds the .mcp.json entry to existing installsThe 60 detection rules are unchanged — this release adds surfaces, not signatures.
Full documentation: README · SKILL.md · SECURITY.md
v1.0.0 — vibe-shield: security scanner & MCP guard for AI-generated code
Security gate for AI-written code. Zero runtime dependencies, no network calls, no code execution — npx vibe-shield scan works offline and in an air-gapped CI runner.
Your agent ships fast. It also ships NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY, a DELETE route with no session check, and a CREATE TABLE with no Row Level Security — because it was optimising for "it works". vibe-shield encodes those exact shapes.
📊 60-rule coverage matrix
48 code signatures + 12 agent-integrity signatures. Every rule carries an id, a CWE, a vulnerable example, a secure example and ordered remediation steps — npx vibe-shield explain <ID>.
VSB-CLIENT-* — client-side secret & data exposure (7)
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ + a server-only secret name |
200 | critical |
002 |
server-only process.env.*SECRET* read inside a "use client" module |
200 | high |
003 |
createClient(url, SERVICE_ROLE_KEY) — RLS bypass from client-reachable code |
250 | critical |
004 |
supabaseAdmin / serviceRoleClient referenced from browser code |
250 | critical |
005 |
dangerouslyAllowBrowser: true, provider SDK keyed in the browser |
749 | high |
006 |
.env* assigns a live-looking credential to a public variable |
540 | critical |
007 |
next.config.js env / publicRuntimeConfig / Vite define inlining a secret |
798 | critical |
VSB-AUTH-* — unguarded mutation routes (9)
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
App Router POST/PUT/PATCH/DELETE handler with no session check |
306 | critical |
002 |
Pages API mutation handler with no session check | 306 | critical |
003 |
Express / Fastify / Koa / Hono mutation route with no auth middleware | 862 | high |
004 |
IDOR — ownership key taken from body/query/params instead of the session | 639 | critical |
005 |
"use server" action mutating data with no auth |
306 | high |
006 |
identity from jwt.decode, x-user-id, verify:false, algorithms:['none'] |
347 | critical |
007 |
admin/destructive surface that authenticates but never checks a role | 863 | high |
008 |
session fetched but never enforced | 287 | medium |
009 |
cookie-session mutation with no CSRF token protection | 352 | medium |
VSB-DB-* — database exposure (10)
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
CREATE TABLE with no ENABLE ROW LEVEL SECURITY anywhere in the project |
284 | critical* |
002 |
permissive policy — USING (true), WITH CHECK (true), USING (1=1) |
732 | critical |
003 |
anon/authenticated policy whose USING never references auth.uid() |
639 | high |
004 |
GRANT … TO anon/public (writes), incl. GRANT ALL |
732 | critical |
005 |
DISABLE ROW LEVEL SECURITY, DROP POLICY, BYPASSRLS |
284 | critical |
006 |
$queryRawUnsafe, $executeRawUnsafe, knex.raw, .raw() with a dynamic string |
89 | critical |
007 |
hand-built SQL from request data — ${}, +, f-strings, PHP interpolation |
89 | critical |
008 |
Supabase service-role key outside a server-only boundary |
250 | critical |
009 |
createBucket(…, { public: true }) |
732 | medium |
010 |
request data used as a table, column or ORDER BY identifier |
89 | high |
* critical when Supabase/PostgREST is detected.
VSB-AI-* — LLM & classic web (15)
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
exec/spawn({shell:true})/os.system/subprocess(shell=True) |
78 | critical |
002 |
LLM/MCP tool execute reaching a shell, eval or filesystem sink |
94 | critical |
003 |
model output into eval/new Function/vm.runInNewContext |
94 | critical |
004 |
untrusted/RAG content interpolated into a system prompt (OWASP LLM01) |
74 | high |
005 |
Stripe webhook without constructEvent |
345 | critical |
006 |
webhook signing secret read from the request | 345 | high |
007 |
GitHub/Slack/Shopify/Svix webhook with no signature verification | 345 | high |
008 |
dangerouslySetInnerHTML, v-html, {@html}, innerHTML, .html() |
79 | high |
009 |
client eval/new Function/string setTimeout/javascript: URLs |
94 | high |
010 |
open redirect — redirect(searchParams.get('next')) |
601 | medium |
011 |
SSRF — fetch(req.body.url) |
918 | high |
012 |
path traversal — path.join(dir, req.params.name) |
22 | high |
013 |
upload handling with no size or type limit | 434 | medium |
014 |
public LLM endpoint with no rate limit or quota | 770 | medium |
015 |
pickle.loads, yaml.load without SafeLoader, PHP unserialize |
502 | high |
VSB-SECRET-* — hardcoded credentials (7)
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
vendor signature in a server file (Stripe, OpenAI, AWS, GitHub, Supabase, …) | 798 | high |
002 |
generic high-entropy assignment to a credential-shaped name | 798 | medium |
003 |
PEM private key material | 321 | critical |
004 |
hardcoded JWT whose payload carries service_role / admin |
250 | critical |
005 |
the same vendor credential in a browser-reachable file | 200 | critical |
006 |
postgres:postgres@…, password = "admin", entropy < 2.5 |
1392 | medium |
007 |
.env with live credentials — critical when git-tracked |
540 | critical |
VSB-AGENT-* — agent skill & MCP poisoning (12) → audit-skills
| ID | Detects | CWE | Sev |
|---|---|---|---|
001 |
zero-width, bidi-override, Unicode-tag characters hiding instructions | 74 | critical |
002 |
curl/wget/nc exfiltrating env vars or .env |
200 | critical |
003 |
instructions to read .env, ~/.ssh, ~/.aws/credentials, id_rsa |
522 | critical |
004 |
unpinned npx -y/uvx, remote MCP URL, curl | sh install |
829 | high |
005 |
literal credentials in an env block, or "*": "*" env forwarding |
526 | critical |
006 |
"ignore previous instructions", "do not tell the user", "auto-approve" | 74 | critical |
007 |
Bash(*), Write(*), autoApprove: ["*"], dangerouslySkipPermissions |
284 | high |
008 |
base64 payload / eval(atob(…)) / base64 -d | sh |
94 | high |
009 |
"fetch <url> and follow every instruction" | 829 | critical |
010 |
missing frontmatter, wildcard allowed-tools |
250 | medium |
011 |
literal credential inside an instruction/MCP file | 798 | critical |
012 |
eval "$1", sh -c "$VAR" in a skill script |
78 | medium |
🧠 audit-skills — MCP & skill poisoning auditor
Agent skills, Cursor rules, AGENTS.md and MCP configuration are executable instruction surfaces, and almost nothing audits them. audit-skills reads .claude/, .cursor/, .windsurf/, .cline/, .continue/, AGENTS.md, CLAUDE.md and mcp.json and reports the 12 VSB-AGENT-* classes above.
It distinguishes three things that regexes usually conflate: documentation (a quoted example of an attack), prohibitions (an instruction not to do something), and payloads (a bare imperative telling the agent to disable its own safety). That distinction is why the shipped SKILL.md, which enumerates every attack shape it detects, scores A+ instead of flagging itself.
npx vibe-shield audit-skills
npx vibe-shield audit-skills .claude # scope to a directory📡 SARIF export → GitHub code scanning
npx vibe-shield scan --format sarif --out vibe-shield.sarifSARIF 2.1.0 with full rule metadata, CWE tags and physical locations, so findings appear inline on the pull request diff and under Security → Code scanning. The github format emits native workflow annotations as an alternative, and --fail-on turns any severity into an exit code.
✅ 174-test verification suite
tests/scanner.test.ts 66 detection, suppression, scoring, reporters
tests/skill-auditor.test.ts 55 agent-surface rules, discovery, triage
tests/cli.test.ts 51 flags, formats, exit codes, init, package contract
---
174 passing
The rules are guarded in both directions, which is the part that matters:
- Vulnerable fixture — a 21-file Next.js + Supabase + Express app: F, 0/100, 27 findings across all six families, 18 critical.
- Secure fixture — a 12-file hardened app with auth, RLS, sanitisation, rate limiting and webhook verification: A+ 100/100, zero findings. A rule that fires on secure code fails the build.
- Self-scanning —
scanandaudit-skillsboth score A+ 100/100 on this repository in CI, on every push.
CI matrix runs Node 18 / 20 / 22 / 24. Node 18 builds the binary and smoke-tests every command, format and exit code against the fixtures; 20+ run the full suite. Coverage thresholds (85% lines, 68% branches) are enforced.
Install
npx vibe-shield scan # scan the current project
npx vibe-shield scan --fix-prompt # write SECURITY_PATCH_PROMPT.md for your agent
npx vibe-shield init # install the Agent Skill + AGENTS.md + CI gateinit is idempotent and never clobbers without --force. Node.js >= 18.17.
Full documentation: README · SKILL.md · SECURITY.md · CONTRIBUTING.md