@viberaven/cli 1.6.3 → 1.6.5
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.
- package/README.md +34 -80
- package/dist/cli.js +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,113 +1,67 @@
|
|
|
1
1
|
# @viberaven/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@viberaven/cli)
|
|
5
|
-
[](https://www.npmjs.com/package/@viberaven/cli)
|
|
3
|
+
A successful deploy does not show whether one user can read another user's rows. VibeRaven reads an AI-built Vercel + Supabase app's repository for missing row level security (RLS), permissive policies and other launch gaps, then writes findings and tasks a coding agent can work through.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
<img src="https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/banner.png" alt="VibeRaven — AI got your app to demo. VibeRaven gets it to production." width="100%" />
|
|
9
|
-
</p>
|
|
5
|
+
Use a pass before launch or client handoff, after a migration or policy change, or when investigating a production RLS, environment, database connection, service-role or Stripe webhook failure.
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
## Start From Your App
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
Requires Node.js 20 or newer. Run from the app's project root:
|
|
14
10
|
|
|
15
11
|
```bash
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
That command opens the table:
|
|
20
|
-
|
|
21
|
-
- **Your hand** — providers as foil cards; click or drop one on the table and its launch checks run in chat, graded 1-10 from repo evidence.
|
|
22
|
-
- **The version pile** — pull a release card to see what changed (real git compare + changelog), view the diff, or ask the agent to explain it.
|
|
23
|
-
- **The region map** — your app as territory: pages, modules, and provider cards connected by routes, every card movable.
|
|
24
|
-
- **Agentic chat** — missions run through your connected CLI, with `ask` / `approve` / `full` access modes and inline approve for risky work.
|
|
25
|
-
- Provider MCP visibility, terminal, and diff views included.
|
|
26
|
-
|
|
27
|
-
The unscoped `viberaven` package is a small shim that launches this CLI package.
|
|
28
|
-
|
|
29
|
-
## Agent Connections
|
|
30
|
-
|
|
31
|
-
Inside the Studio, connect an installed CLI and test it before chat control:
|
|
12
|
+
# Open the local Studio
|
|
13
|
+
npx -y viberaven@1.6.5
|
|
32
14
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Installed is not the same as connected. VibeRaven asks the selected CLI to prove it can run in the current repo before using it for real chat work.
|
|
38
|
-
|
|
39
|
-
## Provider And Release Context
|
|
15
|
+
# Fresh terminal check
|
|
16
|
+
npx -y viberaven@1.6.5 check
|
|
17
|
+
```
|
|
40
18
|
|
|
41
|
-
|
|
19
|
+
The `viberaven` package launches this CLI. Studio combines findings, provider context and git comparisons. For chat, select an installed/authenticated Codex CLI, Claude Code or Gemini CLI and use **Test connection**. Access modes: `ask`, `approve`, `full`. Stop Studio with Ctrl+C.
|
|
42
20
|
|
|
43
|
-
|
|
44
|
-
- Releases: current and recent git tags, changelog snippets, rollback context, and release comparisons.
|
|
45
|
-
- Architecture: repo and provider boundaries for inspection and planning.
|
|
21
|
+
## Repository Evidence And Tasks
|
|
46
22
|
|
|
47
|
-
|
|
23
|
+
Checks include migration tables without RLS, unrestricted policy conditions such as `USING (true)`, browser-exposed service-role keys, environment names missing from `.env.example` or similar templates, and Stripe handlers without raw-body signature verification.
|
|
48
24
|
|
|
49
|
-
|
|
25
|
+
`check` refreshes `.viberaven/agent-tasklist.md` (tasks and source locations), `gate-result.json` (full verdict), `context-map.json` (agent context) and `gaps/<gapId>.json` without patching app source.
|
|
50
26
|
|
|
51
|
-
|
|
27
|
+
`check --json` prints a findings summary and artifact paths. `--json` without `check` runs a fresh scan and prints the full gate object.
|
|
52
28
|
|
|
53
29
|
```bash
|
|
54
|
-
npx -y viberaven check --json
|
|
55
|
-
npx -y viberaven --
|
|
56
|
-
npx -y viberaven
|
|
57
|
-
npx -y viberaven --
|
|
30
|
+
npx -y viberaven@1.6.5 check --json
|
|
31
|
+
npx -y viberaven@1.6.5 audit --vercel-supabase --json
|
|
32
|
+
npx -y viberaven@1.6.5 fix --gap <gapId> --dry-run
|
|
33
|
+
npx -y viberaven@1.6.5 init --agents all --dry-run
|
|
58
34
|
```
|
|
59
35
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npx -y viberaven next --json
|
|
64
|
-
npx -y viberaven prompt --gap <id>
|
|
65
|
-
npx -y viberaven audit --vercel-supabase
|
|
66
|
-
```
|
|
36
|
+
Read tasks and source before targeted edits. Preview fixes first. The `rls_disabled` recipe adds an RLS migration without policies: agree before applying, because browser roles lose row access until policies exist. Apply/test through your database workflow; recheck after a batch. Provider actions require provider evidence.
|
|
67
37
|
|
|
68
|
-
##
|
|
38
|
+
## Exit Codes And CI
|
|
69
39
|
|
|
70
|
-
|
|
40
|
+
`check` returns 0 with no critical blockers, allowing warnings; 1 for critical blockers; 2 for a scan or comparison error. Unrestricted SELECT can be intentional public content and is a default warning. The focused audit returns 1 whenever its status is not `pass`, including warnings.
|
|
71
41
|
|
|
72
42
|
```bash
|
|
73
|
-
|
|
43
|
+
# Fail on blockers
|
|
44
|
+
npx -y viberaven@1.6.5 --strict --json
|
|
45
|
+
# Also fail on warnings
|
|
46
|
+
npx -y viberaven@1.6.5 --strict=warning --json
|
|
74
47
|
```
|
|
75
48
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- `.viberaven/agent-tasklist.md`
|
|
79
|
-
- `.viberaven/gate-result.json`
|
|
80
|
-
- `.viberaven/context-map.json`
|
|
81
|
-
- `.viberaven/agent-summary.md`
|
|
82
|
-
- `.viberaven/launch-playbook.md`
|
|
49
|
+
Default `--strict` returns 0 for `clear`/`warning`, 1 for `not_clear`, 2 for `error`, 3 for `unknown` or unavailable results. `--strict=warning` also returns 1 for warnings.
|
|
83
50
|
|
|
84
|
-
|
|
51
|
+
## Optional Artifact Compatibility Mode
|
|
85
52
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Use the MCP package when an agent host supports MCP tools:
|
|
53
|
+
Older integrations can keep the canonical artifact command:
|
|
89
54
|
|
|
90
55
|
```bash
|
|
91
|
-
npx -y
|
|
56
|
+
npx -y viberaven --agent-mode
|
|
92
57
|
```
|
|
93
58
|
|
|
94
|
-
|
|
59
|
+
Studio remains the default. MCP hosts use the separate [`@viberaven/mcp`](https://www.npmjs.com/package/@viberaven/mcp) package.
|
|
95
60
|
|
|
96
|
-
##
|
|
61
|
+
## Scope And Evidence
|
|
97
62
|
|
|
98
|
-
|
|
99
|
-
npm --prefix packages/cli run typecheck
|
|
100
|
-
npm --prefix packages/cli test -- local-ui/server.test.ts
|
|
101
|
-
npm --prefix packages/cli run build
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
For a local package publish check, run from this package directory:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
cd packages/cli
|
|
108
|
-
npm pack --dry-run
|
|
109
|
-
```
|
|
63
|
+
The scan needs no VibeRaven login or API key; npm downloads can need network. It does not query live policies, prove complete permission coverage, run your build or deploy. With RLS off, table grants determine which roles and operations can reach rows. Verify live user access and provider environment, DNS, billing and webhooks separately. A clear result or score is not a security audit.
|
|
110
64
|
|
|
111
|
-
|
|
65
|
+
The [missing-RLS example](https://ohad6k.github.io/VibeRaven/examples/proof/missing-rls/) and [RLS comparison](https://ohad6k.github.io/VibeRaven/examples/proof/rls-comparison/) retain published **1.6.3** runs. They are maintainer-authored, not new scans or independent endorsement. Comparison databases are local, not hosted Supabase.
|
|
112
66
|
|
|
113
|
-
MIT
|
|
67
|
+
[Public repository](https://github.com/ohad6k/VibeRaven) | [Agent reference](https://ohad6k.github.io/VibeRaven/llms.txt). License: MIT.
|
package/dist/cli.js
CHANGED
|
@@ -8484,8 +8484,9 @@ function readFunctionAttributes(tokens) {
|
|
|
8484
8484
|
if (t.value === "security" && next?.kind === "word" && (next.value === "definer" || next.value === "invoker")) {
|
|
8485
8485
|
out.definer = next.value === "definer";
|
|
8486
8486
|
}
|
|
8487
|
-
if (t.value === "returns" && next?.kind === "word") {
|
|
8488
|
-
|
|
8487
|
+
if (t.value === "returns" && (next?.kind === "word" || next?.kind === "ident")) {
|
|
8488
|
+
const type = next.value;
|
|
8489
|
+
out.returnsTrigger = type === "trigger" || type === "event_trigger";
|
|
8489
8490
|
}
|
|
8490
8491
|
}
|
|
8491
8492
|
return out;
|
|
@@ -8613,7 +8614,7 @@ function analyzeRls(replay) {
|
|
|
8613
8614
|
}
|
|
8614
8615
|
if (!table2.rls && (table2.created || table2.disabledLoc)) {
|
|
8615
8616
|
const where = table2.disabledLoc ?? table2.arrivedLoc ?? table2.created;
|
|
8616
|
-
const risk = "
|
|
8617
|
+
const risk = "Without RLS, 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.";
|
|
8617
8618
|
const message = table2.disabledLoc ? `${table2.display} has row level security turned off at ${at(table2.disabledLoc)}. ${risk}` : table2.arrivedLoc ? `${table2.display} is moved into public at ${at(table2.arrivedLoc)} without row level security, and no later migration enables it. ${risk}` : `${table2.display} is created at ${at(table2.created)} and no migration enables row level security on it. ${risk}`;
|
|
8618
8619
|
missingRls.push({
|
|
8619
8620
|
id: "rls_disabled",
|
|
@@ -9439,7 +9440,7 @@ function buildRlsCheck(replay) {
|
|
|
9439
9440
|
id: "supabase-rls-policy-proof",
|
|
9440
9441
|
title: "Supabase RLS policy proof",
|
|
9441
9442
|
status: "needs_work",
|
|
9442
|
-
summary: `${plural(analysis.missingRls.length, "public table")} without row level security: ${names}.
|
|
9443
|
+
summary: `${plural(analysis.missingRls.length, "public table")} without row level security: ${names}. 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.`,
|
|
9443
9444
|
evidence: findingEvidence(analysis.missingRls),
|
|
9444
9445
|
findings
|
|
9445
9446
|
};
|
|
@@ -15022,7 +15023,7 @@ var VERSION;
|
|
|
15022
15023
|
var init_version = __esm({
|
|
15023
15024
|
"src/version.ts"() {
|
|
15024
15025
|
"use strict";
|
|
15025
|
-
VERSION = "1.6.
|
|
15026
|
+
VERSION = "1.6.5";
|
|
15026
15027
|
}
|
|
15027
15028
|
});
|
|
15028
15029
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viberaven/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "VibeRaven CLI and local Studio: Supabase RLS and security check for AI-built Vercel + Supabase apps, with an agent task list and fix prompts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VibeRaven",
|