rowprobe 0.0.0-stage → 0.2.0

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/README.md +58 -2
  2. package/dist/rowprobe.mjs +1382 -0
  3. package/package.json +33 -4
package/README.md CHANGED
@@ -1,3 +1,59 @@
1
- # Temporary Holding Version
1
+ # RowProbe Supabase leak check
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Fails your build when someone could get at data they shouldn't in your Supabase app.
4
+ It signs in as two test users and attacks the way a curious customer would. Same engine as [rowprobe.com](https://rowprobe.com).
5
+
6
+ What it tries, on every push:
7
+
8
+ - **Other users' rows:** Alice reads, edits, deletes and creates Bob's rows; a signed-out visitor tries too.
9
+ - **Users promoting themselves:** Alice changes her own `role`, `is_admin`, `plan`, `credits` or company.
10
+ - **Other users' files:** Bob uploads a test file; Alice tries to list, download, replace and delete it.
11
+ - **Database functions:** called as a visitor and with Bob's ids, read-only, so nothing changes.
12
+ - **Anonymous sign-in:** if it's on, a throwaway anonymous account checks what anyone can read.
13
+ - **Secret keys in your website** (with `site`): service_role / secret keys, Stripe, OpenAI, database URLs, exposed `.env`.
14
+
15
+ Every test change is undone.
16
+
17
+ ## Setup
18
+
19
+ 1. Get a CI token at [rowprobe.com/account](https://rowprobe.com/account) (RowProbe Pro).
20
+ 2. Create two test users in **different accounts/companies** of your app, with a little data each.
21
+ 3. Add these repository secrets (Settings → Secrets and variables → Actions):
22
+ `ROWPROBE_TOKEN`, `SUPABASE_URL`, `SUPABASE_ANON_KEY`,
23
+ `ROWPROBE_ALICE_EMAIL`, `ROWPROBE_ALICE_PASSWORD`, `ROWPROBE_BOB_EMAIL`, `ROWPROBE_BOB_PASSWORD`
24
+ 4. Add `.github/workflows/rowprobe.yml`:
25
+
26
+ ```yaml
27
+ name: RowProbe leak check
28
+ on: [push, pull_request]
29
+ jobs:
30
+ rowprobe:
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: rowprobe/action@v1
34
+ with:
35
+ rowprobe-token: ${{ secrets.ROWPROBE_TOKEN }}
36
+ supabase-url: ${{ secrets.SUPABASE_URL }}
37
+ supabase-key: ${{ secrets.SUPABASE_ANON_KEY }}
38
+ alice-email: ${{ secrets.ROWPROBE_ALICE_EMAIL }}
39
+ alice-password: ${{ secrets.ROWPROBE_ALICE_PASSWORD }}
40
+ bob-email: ${{ secrets.ROWPROBE_BOB_EMAIL }}
41
+ bob-password: ${{ secrets.ROWPROBE_BOB_PASSWORD }}
42
+ # site: https://staging.myapp.com # check its code for leaked keys
43
+ # shared: plans,countries # tables meant to be public
44
+ # fail-on: critical # leak (default) | critical | never
45
+ ```
46
+
47
+ The job summary lists every leak with a plain-English explanation and a copy-paste SQL fix.
48
+
49
+ ## Privacy
50
+
51
+ Your Supabase keys, test logins and data stay in your CI runner. RowProbe only receives your CI token
52
+ (to check your plan), table/column/bucket/function names (to write fixes) and, if you set `site`, your
53
+ website's address (our server downloads its public code; any key found is shown masked).
54
+
55
+ ## Without GitHub
56
+
57
+ ```bash
58
+ npx rowprobe scan --help
59
+ ```