checkmyvibe 1.2.0 → 1.3.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.
- package/README.md +247 -44
- package/SKILL.md +405 -396
- package/adapters/AGENTS-SNIPPET.md +32 -0
- package/adapters/checkmyvibe.mdc +18 -0
- package/adapters/opencode-checkmyvibe.md +19 -0
- package/commands/checkmyvibe-auth.md +15 -9
- package/commands/checkmyvibe-backend.md +24 -14
- package/commands/checkmyvibe-db.md +32 -14
- package/commands/checkmyvibe-frontend.md +23 -9
- package/commands/checkmyvibe-payment.md +53 -14
- package/commands/checkmyvibe-secrets.md +22 -13
- package/commands/checkmyvibe.md +12 -11
- package/install.js +58 -0
- package/package.json +2 -1
- package/references/vibe_risk_patterns.md +65 -21
- package/scripts/check_auth_patterns.py +27 -2
- package/scripts/check_db_config.py +72 -23
- package/scripts/check_gitignore.py +92 -14
- package/scripts/check_payment_config.py +146 -0
- package/scripts/scan_secrets.py +43 -0
package/SKILL.md
CHANGED
|
@@ -1,396 +1,405 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: checkmyvibe
|
|
3
|
-
description: >
|
|
4
|
-
Use this skill when the user asks to "check my vibe", run a production readiness check, review code quality, do a sanity check, check for exposed environment variables, or check if the app is ready to launch/ship, or runs a scoped check like `/checkmyvibe db`, `/checkmyvibe auth`, `/checkmyvibe secrets`, `/checkmyvibe payment`, `/checkmyvibe backend`, or `/checkmyvibe frontend`. Also trigger proactively when the agent is about to help deploy, publish, or push an application live, or when the codebase shows signs of AI-scaffolded patterns (Supabase/Firebase config, recently generated boilerplate, auth stubs, no existing verification) and the user has not had one done yet.
|
|
5
|
-
---
|
|
6
|
-
# checkmyvibe — Production Readiness & Code Quality Check for Vibe-Coded Apps
|
|
7
|
-
|
|
8
|
-
## Why this skill exists
|
|
9
|
-
|
|
10
|
-
AI coding tools optimize for "it works," not "it's production-ready." A feature can pass every
|
|
11
|
-
manual test a non-technical founder runs — sign up, log in, place an order — and
|
|
12
|
-
still leak every other user's data to a stranger who changes one number in a URL.
|
|
13
|
-
This happens because AI-generated code frequently ships with scaffolding shortcuts
|
|
14
|
-
that were meant to be temporary (a stub auth check, a permissive default database
|
|
15
|
-
rule) and never get hardened before launch, precisely because the person building
|
|
16
|
-
the app doesn't know those shortcuts exist or what to look for.
|
|
17
|
-
|
|
18
|
-
Your job when this skill is active: think like an experienced software engineer doing a
|
|
19
|
-
pre-launch quality review for a client who has never heard the words "IDOR" or "row-level
|
|
20
|
-
security." Find the real, addressable configuration and logic issues. Explain them in plain
|
|
21
|
-
language. Give exact fixes. Do not pad the report with theoretical concerns that don't apply
|
|
22
|
-
to this specific codebase, and do not skip a check because the codebase "looks simple" —
|
|
23
|
-
simple codebases are exactly where stubbed auth and hardcoded secrets hide, because nobody
|
|
24
|
-
expected them to hold real user data yet.
|
|
25
|
-
|
|
26
|
-
## Scope and honesty (read this before writing any report)
|
|
27
|
-
|
|
28
|
-
This is a first-pass review for known, documented scaffolding failure patterns. It is not a
|
|
29
|
-
comprehensive external validation, and it does not cover infrastructure hosting, third-party package
|
|
30
|
-
issues, or novel/business-logic-specific flaws outside the categories below. Never tell the user their app is completely "secure" or "safe" in an unqualified way.
|
|
31
|
-
The correct language is "no issues found in this pass" or "ready to ship as far as
|
|
32
|
-
these checks go" — always paired with the scope reminder in the Final Summary
|
|
33
|
-
section. If the app appears to handle payments, health data, or other regulated
|
|
34
|
-
data, say explicitly that a professional verification is strongly recommended regardless
|
|
35
|
-
of what this pass finds.
|
|
36
|
-
|
|
37
|
-
## Scope selection
|
|
38
|
-
|
|
39
|
-
checkmyvibe supports targeted/scoped scanning for rapid iteration during development, as well as full audits before release. When a specific scope or slash command is specified, execute only the mapped checks:
|
|
40
|
-
|
|
41
|
-
| Scope / Command Keyword | Included Checks | Description / Focus Area |
|
|
42
|
-
| :--- | :--- | :--- |
|
|
43
|
-
| **`secrets`** | **Check 1a + Check 1b + Check 2** | Server-side and client-exposed credentials, API keys, tokens, and `.
|
|
44
|
-
| **`auth`** | **Check 3** | Missing, mock, stubbed, or bypassed authentication guards |
|
|
45
|
-
| **`db`** | **Check 4** | Database & BaaS rules
|
|
46
|
-
| **`backend`** | **Check 1a + Check 3 + Check 4 + Check 5 + Check 6 (server-side) + Check 7 (server-side)** | All server-side logic: hardcoded server credentials, auth guards, database configs, IDOR/BOLA, SQLi/input validation, mass assignment, and payment/webhook processing |
|
|
47
|
-
| **`frontend`** | **Check 1b + Check 3 (client-side view) + Check 7 (client-side view)** | Client-side bundle leaks, UI-only auth hiding, and client-controlled payment/pricing logic |
|
|
48
|
-
| **`payment`** | **Check 7** | Client-side payment amount tampering, price overrides, unverified webhooks, and
|
|
49
|
-
| *(no argument / `full`)* | **All Checks (1a–7)** | Full production readiness and code quality audit |
|
|
50
|
-
|
|
51
|
-
> **Canonical definitions note:** The check definitions in this file are canonical. The scoped command files (`commands/checkmyvibe-*.md`) contain mirrored copies of their relevant checks so they can run standalone. When you change what a check does, update it here AND in every command file that mirrors it.
|
|
52
|
-
|
|
53
|
-
### Rules for Scoped Runs:
|
|
54
|
-
- **Execute only the selected checks:** Do not run unselected check scripts or inspect code outside the chosen scope.
|
|
55
|
-
- **Explicit scope transparency:** At the start and in the final summary of the report, clearly state which checks were run and which checks were skipped.
|
|
56
|
-
- **No false safety claims:** A clean scoped scan does **not** mean the app is ready for production. State clearly: *"This was a [scope]-only check. Run a full `/checkmyvibe` audit across all categories prior to launch."*
|
|
57
|
-
|
|
58
|
-
## Before you start
|
|
59
|
-
|
|
60
|
-
1. **Analyze and understand the whole project first:** Walk the directory tree and analyze the repository configuration files before running any checks, generating findings, or providing instructions. Establish a solid high-level understanding of the architecture, components, and data flow.
|
|
61
|
-
2. Identify the stack: what backend/framework, what database or BaaS provider
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
##
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
**
|
|
101
|
-
|
|
102
|
-
- A
|
|
103
|
-
|
|
104
|
-
- A
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## Check
|
|
134
|
-
|
|
135
|
-
**Run the script** `scripts/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
**
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
- **
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
**[
|
|
332
|
-
|
|
333
|
-
- **
|
|
334
|
-
|
|
335
|
-
- **Why it matters:**
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
- **
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
1
|
+
---
|
|
2
|
+
name: checkmyvibe
|
|
3
|
+
description: >
|
|
4
|
+
Use this skill when the user asks to "check my vibe", run a production readiness check, review code quality, do a sanity check, check for exposed environment variables, or check if the app is ready to launch/ship, or runs a scoped check like `/checkmyvibe db`, `/checkmyvibe auth`, `/checkmyvibe secrets`, `/checkmyvibe payment`, `/checkmyvibe backend`, or `/checkmyvibe frontend`. Also trigger proactively when the agent is about to help deploy, publish, or push an application live, or when the codebase shows signs of AI-scaffolded patterns (Supabase/Firebase/Neon/Prisma/Drizzle config, Dodo Payments/Lemon Squeezy/Stripe, recently generated boilerplate, auth stubs, no existing verification) and the user has not had one done yet.
|
|
5
|
+
---
|
|
6
|
+
# checkmyvibe — Production Readiness & Code Quality Check for Vibe-Coded Apps
|
|
7
|
+
|
|
8
|
+
## Why this skill exists
|
|
9
|
+
|
|
10
|
+
AI coding tools optimize for "it works," not "it's production-ready." A feature can pass every
|
|
11
|
+
manual test a non-technical founder runs — sign up, log in, place an order — and
|
|
12
|
+
still leak every other user's data to a stranger who changes one number in a URL.
|
|
13
|
+
This happens because AI-generated code frequently ships with scaffolding shortcuts
|
|
14
|
+
that were meant to be temporary (a stub auth check, a permissive default database
|
|
15
|
+
rule, client-controlled price calculations, unverified webhooks) and never get hardened before launch, precisely because the person building
|
|
16
|
+
the app doesn't know those shortcuts exist or what to look for.
|
|
17
|
+
|
|
18
|
+
Your job when this skill is active: think like an experienced software engineer doing a
|
|
19
|
+
pre-launch quality review for a client who has never heard the words "IDOR" or "row-level
|
|
20
|
+
security." Find the real, addressable configuration and logic issues. Explain them in plain
|
|
21
|
+
language. Give exact fixes. Do not pad the report with theoretical concerns that don't apply
|
|
22
|
+
to this specific codebase, and do not skip a check because the codebase "looks simple" —
|
|
23
|
+
simple codebases are exactly where stubbed auth and hardcoded secrets hide, because nobody
|
|
24
|
+
expected them to hold real user data yet.
|
|
25
|
+
|
|
26
|
+
## Scope and honesty (read this before writing any report)
|
|
27
|
+
|
|
28
|
+
This is a first-pass review for known, documented scaffolding failure patterns. It is not a
|
|
29
|
+
comprehensive external validation, and it does not cover infrastructure hosting, third-party package
|
|
30
|
+
issues, or novel/business-logic-specific flaws outside the categories below. Never tell the user their app is completely "secure" or "safe" in an unqualified way.
|
|
31
|
+
The correct language is "no issues found in this pass" or "ready to ship as far as
|
|
32
|
+
these checks go" — always paired with the scope reminder in the Final Summary
|
|
33
|
+
section. If the app appears to handle payments, health data, or other regulated
|
|
34
|
+
data, say explicitly that a professional verification is strongly recommended regardless
|
|
35
|
+
of what this pass finds.
|
|
36
|
+
|
|
37
|
+
## Scope selection
|
|
38
|
+
|
|
39
|
+
checkmyvibe supports targeted/scoped scanning for rapid iteration during development, as well as full audits before release. When a specific scope or slash command is specified, execute only the mapped checks:
|
|
40
|
+
|
|
41
|
+
| Scope / Command Keyword | Included Checks | Description / Focus Area |
|
|
42
|
+
| :--- | :--- | :--- |
|
|
43
|
+
| **`secrets`** | **Check 1a + Check 1b + Check 2** | Server-side and client-exposed credentials, AI API keys, tokens, `.gitignore`, and `.dockerignore` file protection |
|
|
44
|
+
| **`auth`** | **Check 3** | Missing, mock, stubbed, or bypassed authentication guards, mock user returns, Clerk matchers, Supabase session checks |
|
|
45
|
+
| **`db`** | **Check 4** | Database & BaaS rules: Supabase RLS, Firebase rules, Neon pooling/SSL, Prisma/Drizzle schema hygiene, public SQLite files, NoSQL injection |
|
|
46
|
+
| **`backend`** | **Check 1a + Check 3 + Check 4 + Check 5 + Check 6 (server-side) + Check 7 (server-side)** | All server-side logic: hardcoded server credentials, auth guards, database configs, IDOR/BOLA (including Server Actions & multi-tenant), SSRF/SQLi/input validation, mass assignment, and payment/webhook processing |
|
|
47
|
+
| **`frontend`** | **Check 1b + Check 3 (client-side view) + Check 6 (DOM XSS / AI markdown) + Check 7 (client-side view)** | Client-side bundle leaks, RSC prop leaks, DOM XSS in AI markdown rendering, UI-only auth hiding, and client-controlled payment/pricing logic |
|
|
48
|
+
| **`payment`** | **Check 7** | Client-side payment amount tampering, price overrides, unverified webhooks (Stripe, Dodo Payments, Lemon Squeezy, Polar, Paddle, Razorpay), webhook idempotency, and subscription lifecycle |
|
|
49
|
+
| *(no argument / `full`)* | **All Checks (1a–7)** | Full production readiness and code quality audit |
|
|
50
|
+
|
|
51
|
+
> **Canonical definitions note:** The check definitions in this file are canonical. The scoped command files (`commands/checkmyvibe-*.md`) contain mirrored copies of their relevant checks so they can run standalone. When you change what a check does, update it here AND in every command file that mirrors it.
|
|
52
|
+
|
|
53
|
+
### Rules for Scoped Runs:
|
|
54
|
+
- **Execute only the selected checks:** Do not run unselected check scripts or inspect code outside the chosen scope.
|
|
55
|
+
- **Explicit scope transparency:** At the start and in the final summary of the report, clearly state which checks were run and which checks were skipped.
|
|
56
|
+
- **No false safety claims:** A clean scoped scan does **not** mean the app is ready for production. State clearly: *"This was a [scope]-only check. Run a full `/checkmyvibe` audit across all categories prior to launch."*
|
|
57
|
+
|
|
58
|
+
## Before you start
|
|
59
|
+
|
|
60
|
+
1. **Analyze and understand the whole project first:** Walk the directory tree and analyze the repository configuration files before running any checks, generating findings, or providing instructions. Establish a solid high-level understanding of the architecture, components, and data flow.
|
|
61
|
+
2. Identify the stack: what backend/framework (Next.js, Express, FastAPI), what database or BaaS provider (Supabase, Firebase, Neon, AWS RDS, Prisma, Drizzle, MongoDB, local SQLite/Postgres), what auth approach (Clerk, NextAuth, Supabase Auth, Firebase, custom JWT), what payment provider (Stripe, Dodo Payments, Lemon Squeezy, Polar, Paddle, Razorpay). This changes which checks apply and how to phrase findings.
|
|
62
|
+
3. Identify what data the app handles: user accounts, payments, health data, messages between users, files. This changes severity judgments — the same missing check is more severe on an app handling payment data than on a toy to-do list.
|
|
63
|
+
4. Run the checks below in order. Use the bundled scripts where noted. For everything else, read the actual code — don't rely on file names alone.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Supported stacks to recognize
|
|
68
|
+
|
|
69
|
+
Common stacks this skill expects include: Next.js (Pages and App Router), Express, FastAPI, Django, Supabase, Firebase, Neon, Prisma, Drizzle, Postgres, MySQL, SQLite, MongoDB/Mongoose, Redis/Upstash, Convex, Clerk, NextAuth/Auth.js, Stripe, Dodo Payments, Lemon Squeezy, Polar.sh, Paddle, Razorpay, Resend, OpenAI/Anthropic/Groq SDKs, and common patterns built around them.
|
|
70
|
+
|
|
71
|
+
## Evidence and confidence rules
|
|
72
|
+
|
|
73
|
+
- Only flag something when there is evidence in the code.
|
|
74
|
+
- Do not guess from filenames, comments, or variable names alone.
|
|
75
|
+
- If something looks suspicious but is not fully proven, mark it with a confidence tag such as `High confidence`, `Medium confidence`, or `Needs manual review`.
|
|
76
|
+
- Do not overflag. Prefer one precise finding over several weak or duplicate ones.
|
|
77
|
+
|
|
78
|
+
## Fix priority
|
|
79
|
+
|
|
80
|
+
When multiple issues are found, sort them in this order:
|
|
81
|
+
Critical user exposure > auth bypass > IDOR > payment logic > config issues > hygiene.
|
|
82
|
+
|
|
83
|
+
## What success looks like
|
|
84
|
+
|
|
85
|
+
The report should help the coding agent make the repo safer in the next commit, not just describe problems.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Check 1a: Server-side secrets and credentials
|
|
90
|
+
|
|
91
|
+
**Run the script** `scripts/scan_secrets.py` (located relative to this `SKILL.md` file) against the project root. It flags known API key prefixes, JWT tokens with service roles, database connection URIs, high-entropy strings, and variable assignments where a name like `key`, `secret`, `token`, or `password` is set to a literal string instead of `process.env.X` or equivalent.
|
|
92
|
+
|
|
93
|
+
**What counts as a finding:**
|
|
94
|
+
|
|
95
|
+
- **Modern AI & Cloud Provider Keys:**
|
|
96
|
+
- OpenAI Project Keys (`sk-proj-...`, `sk-None-...`) — **Critical**
|
|
97
|
+
- Anthropic Claude Keys (`sk-ant-api03-...`) — **Critical**
|
|
98
|
+
- Groq (`gsk_...`), Perplexity (`pplx-...`), HuggingFace (`hf_...`) — **Critical**
|
|
99
|
+
- Resend Email API Keys (`re_...`) — **Critical** (mass spam and phishing abuse)
|
|
100
|
+
- Supabase `service_role` JWT (containing `"role":"service_role"`) — **Critical** (bypasses all Row-Level Security)
|
|
101
|
+
- Hardcoded Database Connection URIs (`postgres://user:pass@host...`, `mongodb+srv://...`) — **Critical**
|
|
102
|
+
- A **live** Stripe secret key (`sk_live_...`) anywhere in source — **Critical**, charges real cards
|
|
103
|
+
- A **test** Stripe secret key (`sk_test_...`) committed in source — **Should Fix**, not production-critical but test keys still must not be committed; rotate if the repo has ever been shared
|
|
104
|
+
- A server-only credential referenced in frontend code, or a Next.js env var missing the required server-only scoping (using a secret key where only `NEXT_PUBLIC_`-prefixed vars should appear) — **Critical**, this is directly shippable to every visitor's browser
|
|
105
|
+
|
|
106
|
+
**What is NOT a finding (avoid false positives):**
|
|
107
|
+
|
|
108
|
+
- Public/anon/publishable keys that are designed to be exposed client-side (Stripe publishable keys starting `pk_`, Supabase anon keys, Firebase apiKey) — these are safe by design as long as server-side authorization is correctly configured. Note this distinction explicitly in the report.
|
|
109
|
+
- Example/placeholder values clearly meant as documentation, e.g. `"your-api-key-here"`
|
|
110
|
+
- Fake credentials inside unit tests, fixtures, or mock files (the scripts already skip these directories; if you find one manually, do not report it)
|
|
111
|
+
|
|
112
|
+
## Check 1b: Client-exposed secrets (frontend scope view)
|
|
113
|
+
|
|
114
|
+
This is the client-facing slice of Check 1a, used by the `frontend` scope. Focus on:
|
|
115
|
+
|
|
116
|
+
- Secrets reachable from the client bundle: any secret referenced in frontend code, anything passed through `NEXT_PUBLIC_*` / `VITE_*` / `REACT_APP_*` / `EXPO_PUBLIC_*` env vars that isn't genuinely public, and secrets inlined in client config files.
|
|
117
|
+
- **React Server Component (RSC) Prop Leaks:** In Next.js App Router, check if a Server Component imports a private secret and passes it as a prop to a client component (`<ClientComponent apiKey={process.env.PRIVATE_KEY} />`). Next.js serializes all props into the client HTML payload — **Critical**.
|
|
118
|
+
- Service-role keys (Supabase `service_role`, Firebase admin SDK private keys, OpenAI/Anthropic/Stripe secret keys) appearing anywhere under `src/`, `app/`, `components/`, `public/`, or client entry points — **Critical**.
|
|
119
|
+
|
|
120
|
+
The severity rules and false-positive guidance from Check 1a apply unchanged.
|
|
121
|
+
|
|
122
|
+
## Check 2: .gitignore and .dockerignore hygiene
|
|
123
|
+
|
|
124
|
+
**Run the script** `scripts/check_gitignore.py` (located relative to this `SKILL.md` file) against the project root.
|
|
125
|
+
|
|
126
|
+
**What counts as a finding:**
|
|
127
|
+
|
|
128
|
+
- `.env`, `.env.local`, `.env.production` present in the working directory and not listed in `.gitignore` — **Critical**, regardless of current contents
|
|
129
|
+
- **Docker Risk:** A `Dockerfile` or `docker-compose.yml` exists, but `.env` is omitted from `.dockerignore` — **Critical** (causes secret environment files to be baked into public image layers on Docker Hub/GHCR)
|
|
130
|
+
- **NPM Auth Tokens:** An `.npmrc` file containing `_authToken=` committed to git — **Critical**
|
|
131
|
+
- `.env` already committed to git history (check with `git log --all --full-history -- .env` if git is available) — **Critical**, and note in the fix that removing it from `.gitignore` going forward is not enough; the secrets in git history must be rotated, since they're recoverable even after deletion
|
|
132
|
+
|
|
133
|
+
## Check 3: Missing or fake authentication
|
|
134
|
+
|
|
135
|
+
**Run the script** `scripts/check_auth_patterns.py` (located relative to this `SKILL.md` file) against the project root as a first pass. Then search auth-related code (login handlers, middleware, route guards, session checks) for these patterns:
|
|
136
|
+
|
|
137
|
+
**What counts as a finding:**
|
|
138
|
+
|
|
139
|
+
- **Always-true stubs:** `function isAuthenticated(req) { return true; }`, `const checkAdmin = () => true` — **Critical**
|
|
140
|
+
- **Hardcoded mock user objects returned:**
|
|
141
|
+
```js
|
|
142
|
+
function getCurrentUser() {
|
|
143
|
+
return { id: "mock-id", role: "admin" }; // Placeholder forgot to replace!
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
Or middleware unconditionally setting `req.user = { id: 123 }` and calling `next()` — **Critical**
|
|
147
|
+
- **Stub-named helpers still wired in:** `mockAuth`, `fakeLogin`, `tempAuth`, `bypassAuth`, `devAuth` still present in a codebase with no clear dev-only guard around it. If properly guarded (e.g. `if (process.env.NODE_ENV === 'development')`), verify the guard is airtight and note it as **Should Fix**.
|
|
148
|
+
- **Provider-specific security gaps:**
|
|
149
|
+
- **Clerk:** Check `middleware.ts` matcher regexes. If API routes or sensitive subpaths are excluded from the matcher, or if Clerk v5 `auth.protect()` is omitted from API routes — **Critical**.
|
|
150
|
+
- **NextAuth / Auth.js:** Missing `AUTH_SECRET` / `NEXTAUTH_SECRET` in production configuration; exposing sensitive user properties or database credentials inside client session callbacks — **Should Fix**.
|
|
151
|
+
- **Supabase Auth:** Using `supabase.auth.getSession()` on the server (Server Components, API routes, Server Actions) instead of `supabase.auth.getUser()`. `getSession()` reads local cookies without re-validating the token with the Supabase Auth server — **Critical**.
|
|
152
|
+
- **Firebase Auth:** Client `auth.currentUser` trusted on server routes without server-side `admin.auth().verifyIdToken()`.
|
|
153
|
+
- **Protected routes with no auth check at all:** Compare route definitions against which ones return or modify user-specific data.
|
|
154
|
+
- **Client-side-only auth checks:** Hiding a button in the UI if not logged in, but the underlying API endpoint doesn't independently verify the session — **Critical**.
|
|
155
|
+
- **Cookie & Token Storage Security:** Auth tokens stored in browser `localStorage` (vulnerable to XSS token theft) rather than `httpOnly`, `Secure`, `SameSite=Lax/Strict` cookies — **Should Fix**.
|
|
156
|
+
- **Password hashing in custom auth:** Storing passwords in plaintext, or using outdated hash algorithms (MD5, SHA-1, plain SHA-256 without salt/work factor) instead of bcrypt or argon2 — **Critical**.
|
|
157
|
+
|
|
158
|
+
## Check 4: Database and backend-as-a-service misconfiguration
|
|
159
|
+
|
|
160
|
+
**Run the script** `scripts/check_db_config.py` (located relative to this `SKILL.md` file) against the project root as a first pass.
|
|
161
|
+
|
|
162
|
+
Distinguish between two architecture models:
|
|
163
|
+
|
|
164
|
+
### Branch A: Client-Exposed BaaS (Supabase, Firebase, Convex)
|
|
165
|
+
In these stacks, the browser connects directly to the database using an anonymous public API key. Security MUST be enforced at the database row/collection level:
|
|
166
|
+
|
|
167
|
+
- **Supabase:** Check for row-level security (RLS) policies on every table holding user-specific data. A table with RLS disabled, or enabled with a policy like `USING (true)` for `SELECT`/`UPDATE`/`DELETE` — **Critical**.
|
|
168
|
+
```sql
|
|
169
|
+
-- Correct pattern:
|
|
170
|
+
CREATE POLICY "users see own orders" ON orders
|
|
171
|
+
FOR SELECT USING (auth.uid() = user_id);
|
|
172
|
+
```
|
|
173
|
+
- **Firebase:** Check `firestore.rules` or `storage.rules` for default-allow states (`allow read, write: if true;`) on user data collections — **Critical**. Test-mode expiration rules (`if request.time < timestamp...`) — **Should Fix**. Check `database.rules.json` for `".read": "true"` — **Critical**.
|
|
174
|
+
- **Convex:** Ensure functions returning private data are defined as `internalQuery` or validate `ctx.auth.getUserIdentity()`.
|
|
175
|
+
|
|
176
|
+
### Branch B: Server-Backed Databases & ORMs (Neon, AWS RDS, Prisma, Drizzle, Local DBs, Mongo)
|
|
177
|
+
In these stacks, client browsers never talk to the database directly; all queries flow through a backend server (Express, FastAPI, Next.js server):
|
|
178
|
+
|
|
179
|
+
- **Do NOT flag missing RLS on server-only tables:** Standard SQL migrations generated by Prisma or Drizzle do not require Postgres RLS if queries are filtered in backend application code.
|
|
180
|
+
- **Neon & Serverless Pooling:** Verify that serverless functions connect via connection pooling (e.g. `@neondatabase/serverless` or PgBouncer pooled connection strings). Direct unpooled Postgres connections in serverless routes cause connection exhaustion and crashes → **Should Fix**.
|
|
181
|
+
- **SSL / Transport Security:** Database connection URIs or pool configs with `sslmode=disable` or `rejectUnauthorized: false` transmit credentials and data in cleartext → **Critical** in production.
|
|
182
|
+
- **SQLite / Embedded DBs:** SQLite databases (`*.db`, `*.sqlite`, `*.sqlite3`) placed in web-accessible public folders (`public/`, `static/`) or committed to git allow arbitrary database download by any visitor → **Critical**.
|
|
183
|
+
- **MongoDB / NoSQL Injection:** Passing unescaped `req.body` or `req.query` directly into Mongoose/MongoDB query filters (e.g., `User.findOne(req.body)`) allows query selector injection (`{ "$gt": "" }` bypassing passwords) → **Critical**.
|
|
184
|
+
|
|
185
|
+
**Storage buckets:** Check whether file storage (Supabase Storage, Firebase Storage, S3) is set to public when it holds private user content (identification documents, invoices, private receipts) — **Critical**.
|
|
186
|
+
|
|
187
|
+
## Check 5: Broken object-level authorization (IDOR / BOLA)
|
|
188
|
+
|
|
189
|
+
This is the single most common serious flaw in vibe-coded apps. Check every route, Next.js Server Action, or RPC procedure that takes an ID and touches a database record:
|
|
190
|
+
|
|
191
|
+
```js
|
|
192
|
+
// Finding example — Critical
|
|
193
|
+
app.get('/api/orders/:id', requireAuth, async (req, res) => {
|
|
194
|
+
const order = await db.query('SELECT * FROM orders WHERE id = $1', [req.params.id]);
|
|
195
|
+
res.json(order); // any logged-in user can read ANY order by guessing/incrementing the id
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// Correct pattern to recommend as the fix
|
|
199
|
+
app.get('/api/orders/:id', requireAuth, async (req, res) => {
|
|
200
|
+
const order = await db.query(
|
|
201
|
+
'SELECT * FROM orders WHERE id = $1 AND user_id = $2',
|
|
202
|
+
[req.params.id, req.user.id]
|
|
203
|
+
);
|
|
204
|
+
if (!order) return res.status(404).json({ error: 'Not found' });
|
|
205
|
+
res.json(order);
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Advanced IDOR Patterns:
|
|
210
|
+
- **Multi-Tenant / Organization IDOR:** In B2B or team apps, verifying `organization_id = req.params.orgId` is NOT enough. You must verify that the requesting `req.user.id` is an active member/admin of `orgId` before executing the query — **Critical**.
|
|
211
|
+
- **Next.js Server Actions:** Functions marked `'use server'` (`export async function deleteDocument(docId)`) are public RPC endpoints. If user authentication and document ownership are not verified inside the function body, anyone can invoke the action remotely — **Critical**.
|
|
212
|
+
- **tRPC / GraphQL Resolvers:** Check that resolvers pulling resources by ID verify authorization in context rather than returning records purely by input ID.
|
|
213
|
+
- Check GET (data exposure), PUT/PATCH (unauthorized modification), and DELETE (unauthorized deletion) across all endpoints.
|
|
214
|
+
|
|
215
|
+
## Check 6: Unvalidated inputs & server input handling
|
|
216
|
+
|
|
217
|
+
Spot-check forms, API endpoints, and server functions for:
|
|
218
|
+
|
|
219
|
+
- **Server-Side Request Forgery (SSRF):** Endpoints that fetch user-supplied URLs (link scrapers, webhooks, image proxies via `axios.get(req.body.url)` or `fetch()`). If URLs are not validated against private IP ranges (`127.0.0.1`, `localhost`, `169.254.169.254` AWS metadata, internal RFC1918 subnets), attackers can exfiltrate cloud credentials or hit internal services — **Critical**.
|
|
220
|
+
- **DOM XSS in AI Markdown Rendering:** Rendering LLM responses or user input using `dangerouslySetInnerHTML`, `v-html`, or markdown renderers (`react-markdown`, `marked`) without sanitization plugins (`rehype-sanitize` or DOMPurify) — **Critical**.
|
|
221
|
+
- **SQL built by string concatenation** instead of parameterized queries or ORM methods — **Critical**.
|
|
222
|
+
- **NoSQL / MongoDB injection:** Passing request objects straight to DB queries — **Critical**.
|
|
223
|
+
- **Mass assignment:** Request bodies spread directly into ORM create/update calls (`prisma.user.update({ where: { id }, data: req.body })`) — lets a user set privileged fields (`role`, `plan`, `isAdmin`, `emailVerified`) — **Critical** if a privileged field can be set, otherwise **Should Fix**.
|
|
224
|
+
- **CORS Misconfiguration:** Wildcard CORS reflection with credentials (`cors({ origin: '*', credentials: true })`) — **Critical**.
|
|
225
|
+
- **No rate limiting on auth endpoints:** Login, signup, password reset, and OTP endpoints with no throttle/attempt limit — **Should Fix** for payment-handling apps, **Worth Reviewing** otherwise.
|
|
226
|
+
- **File uploads with no restriction on file type or size.**
|
|
227
|
+
|
|
228
|
+
## Check 7: Client-side payment logic, webhooks, & subscription lifecycle
|
|
229
|
+
|
|
230
|
+
**Run the script** `scripts/check_payment_config.py` (located relative to this `SKILL.md` file) against the project root as a first pass.
|
|
231
|
+
|
|
232
|
+
### Step 1: Client-Side Price Trust
|
|
233
|
+
Search checkout flows for the price, discount, or total being read from data the client controls (`req.body.price`, `req.body.amount`, hidden form field) rather than looked up server-side from a trusted database record:
|
|
234
|
+
|
|
235
|
+
```js
|
|
236
|
+
// Finding example — Critical
|
|
237
|
+
app.post('/api/checkout', async (req, res) => {
|
|
238
|
+
const { productId, price } = req.body; // price is trusted from the client!
|
|
239
|
+
await chargeCard(req.user.paymentMethod, price);
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// Correct fix pattern
|
|
243
|
+
app.post('/api/checkout', async (req, res) => {
|
|
244
|
+
const { productId } = req.body;
|
|
245
|
+
const product = await db.query('SELECT price FROM products WHERE id = $1', [productId]);
|
|
246
|
+
await chargeCard(req.user.paymentMethod, product.price);
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Step 2: Webhook Signature Verification across Gateways
|
|
251
|
+
Every webhook endpoint (**Stripe**, **Lemon Squeezy**, **Dodo Payments**, **Polar**, **Paddle**, **Razorpay**, **PayPal**) must verify the cryptographic signature before trusting the event payload:
|
|
252
|
+
- **Stripe:** `stripe.webhooks.constructEvent(rawBody, sigHeader, secret)` with raw body parsing.
|
|
253
|
+
- **Lemon Squeezy:** Verify `x-signature` header via HMAC SHA-256.
|
|
254
|
+
- **Dodo Payments:** Verify webhook signature header via Dodo SDK or HMAC.
|
|
255
|
+
- **Paddle:** `paddle.webhooks.unmarshal` or HMAC check.
|
|
256
|
+
- **Razorpay:** `validateWebhookSignature` or HMAC SHA-256 check.
|
|
257
|
+
- An unverified webhook route — **Critical** (anyone can POST fake successful payments).
|
|
258
|
+
|
|
259
|
+
### Step 3: Webhook Idempotency
|
|
260
|
+
Payment gateways retry webhooks when endpoints time out. If the handler does not record and check processed event IDs (`event.id`) in the database, retries will grant duplicate credits or fulfill duplicate orders — **Should Fix**.
|
|
261
|
+
|
|
262
|
+
### Step 4: Subscription Revocation Lifecycle
|
|
263
|
+
AI apps frequently listen for `checkout.session.completed` to grant access, but omit handling for `customer.subscription.deleted`, `customer.subscription.updated`, `subscription_cancelled`, or `invoice.payment_failed`. If omitted, users retain paid access indefinitely after canceling — **Critical**.
|
|
264
|
+
|
|
265
|
+
### Step 5: Billing Portal IDOR
|
|
266
|
+
Creating customer billing portal sessions (`billingPortal.sessions.create`) with `customerId` taken from `req.body` rather than from the authenticated session user's database record allows callers to manage or cancel other customers' subscriptions — **Critical**.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Severity rubric
|
|
271
|
+
|
|
272
|
+
- **Critical** — exploitable right now by any user or visitor, exposes real user data, or allows bypassing authentication or payment. Ship-blocking.
|
|
273
|
+
- **Should Fix** — a genuine weakness that requires more specific conditions to exploit (e.g. requires knowing another user's exact ID, or only affects an admin-only route with a smaller blast radius), or a control that exists but is incomplete/inconsistent.
|
|
274
|
+
- **Worth Reviewing** — best-practice gap with low immediate exploitability given the current app, but worth fixing before the app scales or handles more sensitive data.
|
|
275
|
+
|
|
276
|
+
When in doubt between two levels, consider: could a stranger with no special access do real harm to a real user right now? If yes, Critical.
|
|
277
|
+
|
|
278
|
+
## Report format
|
|
279
|
+
|
|
280
|
+
For every finding, use exactly this structure:
|
|
281
|
+
|
|
282
|
+
- Include a short `Confidence:` line when the evidence is not fully conclusive.
|
|
283
|
+
- Include a `Generated fix:` line when a direct code snippet or precise implementation step would help the agent patch the issue immediately.
|
|
284
|
+
|
|
285
|
+
**[SEVERITY] Short title**
|
|
286
|
+
|
|
287
|
+
- **What's wrong:** plain-English description, no jargon. If a technical term is unavoidable (e.g. "IDOR"), define it in one clause the first time it's used.
|
|
288
|
+
- **Why it matters:** a concrete, real-world consequence a non-technical person would understand — not "this violates the principle of least privilege" but "a stranger could see another user's home address and order history just by changing a number in the browser's address bar."
|
|
289
|
+
- **The fix:** a specific code snippet or precise instruction, not a vague suggestion like "add proper validation."
|
|
290
|
+
- **File(s):** exact path and line number(s).
|
|
291
|
+
|
|
292
|
+
## After the checks: Generate and save `checkmyvibe-report.md`
|
|
293
|
+
|
|
294
|
+
Once the checks are complete, you must **generate and save an exhaustive, detailed Markdown report file named `checkmyvibe-report.md` in the project root** (or target directory if specified). This ensures that founders, clients, project managers, and engineers have a persistent, readable, and actionable artifact to track, share, and reference.
|
|
295
|
+
|
|
296
|
+
The generated `checkmyvibe-report.md` must follow this structure:
|
|
297
|
+
|
|
298
|
+
```markdown
|
|
299
|
+
# 🛡️ checkmyvibe Production Readiness & Code Quality Report
|
|
300
|
+
|
|
301
|
+
| Metadata | Details |
|
|
302
|
+
| :--- | :--- |
|
|
303
|
+
| **Date & Time** | [YYYY-MM-DD HH:MM UTC/Local] |
|
|
304
|
+
| **Target Directory** | `[target path or project root]` |
|
|
305
|
+
| **Scan Scope** | [Full Audit (Checks 1a–7) / Scoped: `secrets`, `auth`, `db`, `backend`, `frontend`, `payment`] |
|
|
306
|
+
| **Detected Stack** | [Framework, Database/ORM, Auth Provider, Payment Gateway] |
|
|
307
|
+
| **Readiness Verdict** | **[Ready to Ship / Needs Fixes Before Launch / No Blocking Issues]** |
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 📋 Executive Summary
|
|
312
|
+
[Plain-English overview of the application's readiness state. Summarize the key risks identified in business terms that non-technical stakeholders (founders, clients) can immediately understand without security jargon.]
|
|
313
|
+
|
|
314
|
+
- **Total Findings:** X Critical, Y Should Fix, Z Worth Reviewing
|
|
315
|
+
- **Fixes Applied This Session:** N issues resolved
|
|
316
|
+
- **Current Status:** [e.g. 1 Critical issue remaining]
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 🔍 Scope Transparency
|
|
321
|
+
- **Included Checks:** [List of checks evaluated in this run]
|
|
322
|
+
- **Skipped Checks:** [List of checks not evaluated, or "None (Full Audit)"]
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## 🚨 Detailed Findings & Remediation
|
|
327
|
+
|
|
328
|
+
[Group findings by severity: Critical first, then Should Fix, then Worth Reviewing. If no issues were found in a category, state "No issues found".]
|
|
329
|
+
|
|
330
|
+
### [CRITICAL / SHOULD FIX / WORTH REVIEWING] Short Descriptive Title
|
|
331
|
+
- **Status:** [Open / Fixed / Applied (Needs Verification)]
|
|
332
|
+
- **Confidence:** [High confidence / Medium confidence / Needs manual review]
|
|
333
|
+
- **File(s):** `path/to/file.ext:line-range`
|
|
334
|
+
- **What's wrong:** [Plain-English description, no jargon. Define any necessary technical terms.]
|
|
335
|
+
- **Why it matters:** [Concrete real-world business and security consequences — e.g. "A stranger could see another user's home address and order history just by changing a number in the browser's address bar."]
|
|
336
|
+
- **The fix:**
|
|
337
|
+
```diff
|
|
338
|
+
- vulnerable_or_scaffolded_code()
|
|
339
|
+
+ hardened_production_code()
|
|
340
|
+
```
|
|
341
|
+
- **Remediation Details:** [Exact steps to apply or verify]
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 🔄 Post-Fix Verification (Before & After)
|
|
346
|
+
[If fixes were applied during this session, document deterministic script re-scan results before and after:
|
|
347
|
+
- `scan_secrets.py`: X findings → Y findings
|
|
348
|
+
- `check_gitignore.py`: FAIL → PASS
|
|
349
|
+
- `check_auth_patterns.py`: X findings → Y findings
|
|
350
|
+
- `check_db_config.py`: FAIL → PASS
|
|
351
|
+
- `check_payment_config.py`: FAIL → PASS]
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## 📌 Action Items Checklist
|
|
356
|
+
- [ ] Fix Critical item 1...
|
|
357
|
+
- [ ] Address Should Fix item 2...
|
|
358
|
+
- [ ] Run full `/checkmyvibe` audit prior to deployment
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## ⚖️ Scope & Honesty Disclaimer
|
|
363
|
+
[Standard scope reminder: checkmyvibe is a first-pass check for AI scaffolding flaws and not a full external third-party penetration test. If handling payments or regulated data, professional external verification is recommended.]
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Post-fix verification rule:** if you applied fixes during this session, re-run the scripts for every category you touched and confirm the finding is actually gone before marking it fixed in the report. Report before/after per check (e.g. "scan_secrets.py: 3 findings → 0 findings"). A fix that hasn't been re-scanned must be listed as "applied, not yet verified", never as resolved.
|
|
367
|
+
|
|
368
|
+
If no issues are found, still generate `checkmyvibe-report.md` stating clearly that no blocking issues were found in this pass, which categories were checked, and what the remaining scope limits are.
|
|
369
|
+
|
|
370
|
+
## Example report style
|
|
371
|
+
|
|
372
|
+
Use clear, direct wording like:
|
|
373
|
+
|
|
374
|
+
**[Critical] Missing object-level authorization**
|
|
375
|
+
|
|
376
|
+
- **What's wrong:** Any logged-in user can read another user's order by changing the order ID.
|
|
377
|
+
- **Why it matters:** A stranger could see someone else's orders and personal details.
|
|
378
|
+
- **The fix:** Add a user ownership check in the query and return 404 when the record does not belong to the current user.
|
|
379
|
+
- **File(s):** `src/routes/orders.ts:42-58`
|
|
380
|
+
|
|
381
|
+
## Final summary (in Chat Response)
|
|
382
|
+
|
|
383
|
+
In addition to saving `checkmyvibe-report.md`, output the executive summary and verdict in your conversation response, ending with:
|
|
384
|
+
|
|
385
|
+
1. Stack and data-sensitivity context noted at the start (one line)
|
|
386
|
+
2. Total findings by severity, e.g. "2 Critical, 3 Should Fix, 1 Worth Reviewing"
|
|
387
|
+
3. A one-line verdict: "Not ready to ship — fix the Critical items first" or "No blocking issues found in this pass — review the Should Fix items when you can"
|
|
388
|
+
4. Confirmation notice that the detailed report has been saved to disk:
|
|
389
|
+
`📄 Detailed report saved to checkmyvibe-report.md`
|
|
390
|
+
5. The scope reminder:
|
|
391
|
+
- **For Full Audit:** "This review covers common configuration patterns seen in AI-generated code — exposed secrets, auth stubs, database rules, object-level authorization, input validation, and client-side payment logic. It is not a comprehensive third-party safety audit or pentest. If this app handles payment, health, or other regulated data, get a professional external review before launch regardless of these results."
|
|
392
|
+
- **For Scoped Scan:** "This was a focused [SCOPE]-only check ([LIST OF RUN CHECKS]). Skipped checks: [LIST OF SKIPPED CHECKS]. A clean scoped check does not mean the application is production-ready. Always run a full `/checkmyvibe` audit prior to release, and obtain a professional external security review if handling sensitive or regulated data."
|
|
393
|
+
|
|
394
|
+
## Notes for the agent
|
|
395
|
+
|
|
396
|
+
- **Always generate and write `checkmyvibe-report.md` to the target directory:** Never skip creating this file. It is the primary deliverable for user handoff.
|
|
397
|
+
- Always produce a review report after the check; do not stop at raw findings.
|
|
398
|
+
- Write the entire report in clear, accessible language. Frame findings around concrete, real-world user consequences rather than abstract technical concepts. A non-technical stakeholder must be able to read the report and immediately understand the real-world danger.
|
|
399
|
+
- The review should clearly separate what was found, what was fixed, how it was fixed, and what remains.
|
|
400
|
+
- Always run the available scripts (located in the `scripts/` directory relative to this `SKILL.md` file) before relying on reasoning alone for Checks 1-4 and Check 7 — they exist so those specific checks are reliable and repeatable rather than dependent on re-deriving the logic every time.
|
|
401
|
+
- Scripts are Python 3: `scan_secrets.py`, `check_gitignore.py`, `check_auth_patterns.py`, `check_db_config.py`, and `check_payment_config.py`. Run them as `python <script> <target>` first; if `python` is not found (common on Linux/macOS), retry with `python3`. Note in the report which interpreter was used.
|
|
402
|
+
- If a script is missing, fails to run, or the language/stack isn't supported by it, say so explicitly in the report ("automated secret scan could not run; manually reviewed instead") rather than silently skipping the check.
|
|
403
|
+
- Do not invent findings to seem thorough. If a check finds nothing, report "No issues found" for that category explicitly — silence looks like the check wasn't performed at all.
|
|
404
|
+
- Do not flag the same underlying issue multiple times under different check categories — pick the most relevant category and reference it once.
|
|
405
|
+
- If the codebase is large, prioritize routes and files that touch authentication, payments, and any endpoint returning data tied to a specific user ID — these are where real damage concentrates.
|