Prisma 7.10

Last reviewed Sep 6, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. 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 whole where, orderBy, select, or include argument.
  • 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 undefined and Prisma.skip for required filter values; Prisma silently omits undefined unless strictUndefinedChecks is enabled.
  • Parse every request value bound to a scalar field in a Prisma where or data argument to its expected primitive type before query construction, for example with z.string().parse(body.token), then validate identifiers, enums, dates, numbers, JSON fields, and cross-field invariants. Scalar where positions also accept filter objects such as { not: '' } or { startsWith: 'a' }, so passing req.body or req.query fields straight into findFirst({ 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