viberaven 1.6.12 → 1.7.1

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 (3) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +68 -28
  3. package/package.json +56 -56
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 VibeRaven
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VibeRaven
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,28 +1,68 @@
1
- # viberaven
2
-
3
- A successful Vercel deploy does not prove that Supabase keeps one user's rows private. VibeRaven reads an AI-built Vercel + Supabase app's repository for missing RLS, permissive policies, browser-exposed service-role keys, environment names absent from `.env.example`, and Stripe handlers without raw-body signature verification.
4
-
5
- This package launches [`@viberaven/cli`](https://www.npmjs.com/package/@viberaven/cli) at the same version and forwards arguments and exit status.
6
-
7
- ## Start From Your App
8
-
9
- Requires Node.js 20 or newer. Run from your app's project root:
10
-
11
- ```bash
12
- # Open the local Studio
13
- npx -y viberaven@1.6.6
14
- # Fresh terminal check
15
- npx -y viberaven@1.6.6 check
16
- ```
17
-
18
- Use a pass before launch or handoff, after a migration/policy change, or for a production RLS, environment, database connection, service-role or Stripe webhook failure. Studio combines findings, provider context and git comparisons. For chat, select an installed/authenticated coding CLI and use **Test connection**.
19
-
20
- `check` refreshes `.viberaven/agent-tasklist.md`, `gate-result.json` and `context-map.json` without patching source. Have the agent read tasks/source and recheck after fixes. `check --json` prints a summary; `--json` prints the full gate object after a fresh scan.
21
-
22
- Default check returns 0 without critical blockers, allowing warnings; 1 with blockers; 2 on scan error. `--strict=warning --json` also fails warnings, with 2 for errors and 3 for unknown/unavailable results. Unrestricted SELECT can be intentional public content and is a warning.
23
-
24
- ## Scope And Integration
25
-
26
- Grants determine access with RLS off. Verify live user access and provider steps separately; repository edits alone cannot complete them. A clear check is not a security audit, build or deployment. The scan needs no VibeRaven login/API key; npm downloads can need network.
27
-
28
- MCP hosts use [`@viberaven/mcp`](https://www.npmjs.com/package/@viberaven/mcp). See the [public repository](https://github.com/ohad6k/VibeRaven), [agent reference](https://ohad6k.github.io/VibeRaven/llms.txt) and [RLS comparison](https://ohad6k.github.io/VibeRaven/examples/proof/rls-comparison/). The maintainer-authored comparison retains published **1.6.3** runs in local databases, not new 1.6.6 scans or independent endorsement. License: MIT.
1
+ # viberaven
2
+
3
+ VibeRaven checks AI-built apps on Vercel + Supabase for launch gaps before you ship: tables without RLS, permissive policies such as `using (true)`, service_role keys in client code, anon-callable security definer functions, the wrong pooler port and unverified Stripe webhooks.
4
+
5
+ ```bash
6
+ npx -y viberaven check
7
+ ```
8
+
9
+ Requires Node.js 20 or newer. Run it from your app's project root. It reads the repository on your machine, needs no VibeRaven account or API key, and names the file and line for each gap. On Windows PowerShell, use `npx.cmd` if `npx` is blocked by the execution policy.
10
+
11
+ This package launches [`@viberaven/cli`](https://www.npmjs.com/package/@viberaven/cli) at the same version and forwards arguments and exit status.
12
+
13
+ ## What it checks
14
+
15
+ | Finding | Gap ID | Related Supabase Security Advisor lint |
16
+ | --- | --- | --- |
17
+ | A public table created in a migration with row level security never enabled | `rls_disabled` | `rls_disabled_in_public` ([guide](https://viberaven.dev/supabase-rls-disabled-in-public)) |
18
+ | A policy with `using (true)` that lets anyone read or write every row | `rls_policy_allows_all_write`, `rls_policy_allows_all_read` | none |
19
+ | The service_role key in a file that ships to the browser, or under a `NEXT_PUBLIC_` name | `service_role_key_in_client_code`, `service_role_key_in_client_env` | none |
20
+ | A security definer function in `public` that no migration closes to `anon` | `security_definer_function_executable` | `anon_security_definer_function_executable` ([guide](https://viberaven.dev/supabase-security-definer-function-anon)) |
21
+ | A direct Postgres connection on port 5432 from serverless code, instead of the transaction pooler on 6543 | `pooler_port_mismatch` | none |
22
+ | A Stripe webhook handler that never checks the signature over the raw body | `unverified_stripe_webhook` | none |
23
+ | Env vars missing from `.env.example`, queries with no row limit, no error monitoring | `env_var_drift`, `unbounded_query`, `missing_monitoring` | none |
24
+
25
+ VibeRaven has no rule yet for `security_definer_view` or `function_search_path_mutable`. These guides explain the fix: [security_definer_view](https://viberaven.dev/supabase-security-definer-view), [function_search_path_mutable](https://viberaven.dev/supabase-function-search-path-mutable).
26
+
27
+ ## Example output
28
+
29
+ From `viberaven check` 1.6.12 on a synthetic Next.js + Supabase app (project path shortened, last four findings cut):
30
+
31
+ ```text
32
+ viberaven check · ~/my-app
33
+
34
+ 🔴 No RLS policy proof in migrations (rls_disabled)
35
+ 1 public table without row level security: public.profiles (supabase/migrations/20260301000000_init.sql:1). The Data API does not enforce row restrictions for roles and operations allowed by the table's grants. Verify those grants to determine who can read or change rows.
36
+ 🔴 A policy lets anyone write every row (rls_policy_allows_all_write)
37
+ Policy "orders are editable" on public.orders (supabase/migrations/20260301000000_init.sql:13) lets anyone, signed in or not, update every row, to any values: using (true).
38
+ 🔴 Service role key used in client code (service_role_key_in_client_code)
39
+ app/admin/page.tsx:4: creates a Supabase client with the service role key. This file ships to the browser, and the service role key skips RLS entirely. Move the call behind a server route or edge function and rotate the key.
40
+ 🟡 Supabase connection is not using the pooler port (pooler_port_mismatch)
41
+ Found direct 5432 DATABASE_URL/POSTGRES_URL evidence. Vercel/serverless deployments should prefer Supabase transaction pooler port 6543.
42
+ 🟡 Security definer function callable by the Data API roles (security_definer_function_executable)
43
+ public.grant_credits(uuid, integer) at supabase/migrations/20260301000000_init.sql:15 is security definer, so it runs with its owner's rights and RLS does not limit what it touches. No migration revokes EXECUTE from public, anon, authenticated, so anyone holding the anon key can call it at /rest/v1/rpc/grant_credits. ...
44
+
45
+ Verdict: ❌ 3 blockers, 5 warnings · score 5
46
+ Fix: viberaven fix · Details: ~/my-app\.viberaven\agent-tasklist.md
47
+ ```
48
+
49
+ `check` writes `.viberaven/agent-tasklist.md`, `gate-result.json` and `context-map.json` without changing your source, so a coding agent can work through the list. `check --json` prints a summary.
50
+
51
+ ## When to use it, and when not to
52
+
53
+ Use it before you launch or hand off a Vercel + Supabase app built with Lovable, Bolt, Cursor, Claude Code or Codex, after a Supabase migration or policy change, or when a production error points at RLS, the service_role key, env vars, the database connection or a Stripe webhook.
54
+
55
+ It is a repository check, not a live database test. It reads migrations and code, so it cannot see a policy added in the Supabase dashboard; use Supabase Security Advisor for the live project. A clear result is not a full security audit: it sends no requests to your app and does not look up dependency CVEs (use OWASP ZAP, Semgrep, Snyk or CodeQL for that). It does not prove the app works (use Playwright or your own tests).
56
+
57
+ ## Exit codes
58
+
59
+ `check` returns 0 with no blockers (warnings allowed), 1 with blockers, 2 on a scan error. `--strict=warning --json` also fails on warnings, and returns 3 for unknown or unavailable results. Unrestricted SELECT can be intentional public content, so it is a warning.
60
+
61
+ ## More
62
+
63
+ - `npx -y viberaven` with no command opens the local Studio, where your own coding agent (Claude Code, Codex or Gemini CLI) makes a change and you see the steps, your checks, the running app and the diff.
64
+ - MCP hosts use [`@viberaven/mcp`](https://www.npmjs.com/package/@viberaven/mcp).
65
+ - In 512 public Lovable projects with a supabase/migrations folder, 47.3% (242) define at least one security definer function in the public schema that a signed-out caller with the anon key can run: [the data](https://viberaven.dev/blog/supabase-security-definer-functions-512-lovable-repos).
66
+ - [GitHub](https://github.com/ohad6k/VibeRaven) · [Supabase Security Advisor guides](https://viberaven.dev/supabase-security-advisor-warnings) · [agent reference](https://ohad6k.github.io/VibeRaven/llms.txt)
67
+
68
+ License: MIT.
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "viberaven",
3
- "version": "1.6.12",
4
- "description": "Supabase RLS and security check for AI-built apps on Vercel + Supabase (Lovable, Bolt, Cursor, Claude Code): tables without RLS, using (true) policies, service role keys in client code, unsigned Stripe webhooks. Runs locally. Advice, not a gate.",
5
- "license": "MIT",
6
- "author": "VibeRaven",
7
- "homepage": "https://viberaven.dev",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/ohad6k/VibeRaven.git",
11
- "directory": "packages/viberaven-shim"
12
- },
13
- "keywords": [
14
- "viberaven",
15
- "launch-readiness",
16
- "production-readiness",
17
- "ai-built-apps",
18
- "vibe-coding",
19
- "mcp",
20
- "claude-code",
21
- "codex",
22
- "cursor",
23
- "supabase",
24
- "vercel",
25
- "stripe",
26
- "supabase-rls",
27
- "row-level-security",
28
- "rls",
29
- "supabase-security",
30
- "security-scanner",
31
- "security",
32
- "lovable",
33
- "bolt",
34
- "secrets",
35
- "service-role-key",
36
- "stripe-webhook",
37
- "postgres",
38
- "migrations"
39
- ],
40
- "publishConfig": {
41
- "access": "public",
42
- "tag": "latest"
43
- },
44
- "bin": {
45
- "viberaven": "bin/viberaven.js"
46
- },
47
- "files": [
48
- "bin"
49
- ],
50
- "dependencies": {
51
- "@viberaven/cli": "1.6.12"
52
- },
53
- "engines": {
54
- "node": ">=20"
55
- }
56
- }
1
+ {
2
+ "name": "viberaven",
3
+ "version": "1.7.1",
4
+ "description": "Pre-launch Supabase RLS and security check for AI-built apps on Vercel + Supabase (Lovable, Bolt, Cursor, Claude Code): tables without RLS, using (true) policies, service_role keys in client code, anon-callable security definer functions, wrong pooler port, unverified Stripe webhooks. Reads the repo locally; not a live database test.",
5
+ "license": "MIT",
6
+ "author": "VibeRaven",
7
+ "homepage": "https://viberaven.dev",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/ohad6k/VibeRaven.git",
11
+ "directory": "packages/viberaven-shim"
12
+ },
13
+ "keywords": [
14
+ "viberaven",
15
+ "launch-checklist",
16
+ "production-readiness",
17
+ "ai-built-apps",
18
+ "vibe-coding",
19
+ "mcp",
20
+ "claude-code",
21
+ "codex",
22
+ "cursor",
23
+ "supabase",
24
+ "vercel",
25
+ "stripe",
26
+ "supabase-rls",
27
+ "row-level-security",
28
+ "rls",
29
+ "supabase-security",
30
+ "security-scanner",
31
+ "security",
32
+ "lovable",
33
+ "bolt",
34
+ "secrets",
35
+ "service-role-key",
36
+ "stripe-webhook",
37
+ "postgres",
38
+ "migrations"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "tag": "next"
43
+ },
44
+ "bin": {
45
+ "viberaven": "bin/viberaven.js"
46
+ },
47
+ "files": [
48
+ "bin"
49
+ ],
50
+ "dependencies": {
51
+ "@viberaven/cli": "1.7.1"
52
+ },
53
+ "engines": {
54
+ "node": ">=20"
55
+ }
56
+ }