Prisma 7.10
Last reviewed Sep 6, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Prisma 7.1056 lines · 1.9K tokens
Total305 lines · 11.8K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 524
- 532
- 602
- 653
- 732
- 770
- 798
- 807
- 829
- 838
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 941
- 942
- 943
- 1004
- 1321
- 1327
- 1333
Prompt Preview
Apply the Node.js 24, TypeScript 7, and JavaScript ES2026 prompts first. These rules cover Prisma 7.10 query safety, raw SQL, data models, selection, tenant isolation, transactions, connection security, logging, migrations, and deployment.
Query construction
- Use Prisma Client's structured query methods for attacker-influenced filters and values.
- Build dynamic
where,orderBy,select,include, relation, and operation shapes from exact server-side allowlists, and never pass a request object as a wholewhere,orderBy,select, orincludeargument. - Bound pagination, filter nesting, relation traversal, selected fields, result rows, and query duration.
- Prevent request data from removing mandatory tenant, ownership, soft-delete, or authorization predicates. Reject
undefinedandPrisma.skipfor required filter values; Prisma silently omitsundefinedunlessstrictUndefinedChecksis enabled. - Parse every request value bound to a scalar field in a Prisma
whereordataargument to its expected primitive type before query construction, for example withz.string().parse(body.token), then validate identifiers, enums, dates, numbers, JSON fields, and cross-field invariants. Scalarwherepositions also accept filter objects such as{ not: '' }or{ startsWith: 'a' }, so passingreq.bodyorreq.queryfields straight intofindFirst({ where: { resetToken } })lets an attacker match any row or leak values by prefix; numeric update fields likewise accept operations such as{ increment: n }.
Raw queries
- Prefer generated