Fastify 5.12

Last reviewed Oct 26, 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. Fastify 5.12112 lines · 6.9K tokens
Total361 lines · 16.9K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 95
  • 113
  • 117
  • 200
  • 208
  • 209
  • 214
  • 248
  • 250
  • 287
  • 295
  • 297
  • 307
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 384
  • 426
  • 434
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 524
  • 532
  • 552
  • 601
  • 602
  • 613
  • 614
  • 653
  • 732
  • 754
  • 770
  • 799
  • 807
  • 829
  • 838
  • 841
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 923
  • 942
  • 943
  • 1004
  • 1275
  • 1321
  • 1333

Prompt Preview

Apply the Node.js 24, TypeScript 7, and JavaScript ES2026 prompts first. These rules cover Fastify 5.12 routing, validation, hooks, plugins, and deployment on Node.js 24 LTS.

Patch and plugin scope

  • Run the newest Fastify 5 release and take each one as it ships. Fastify can ship a security fix, even a breaking one, as a new minor rather than a patch, so declare Fastify with a caret range instead of a tilde range and read the release notes for each minor.
  • Select plugin releases that are compatible with Fastify 5, and update each @fastify/* plugin on its own: every plugin has its own releases and advisories, so check the resolved plugin versions with npm ls after each Fastify upgrade, and read each plugin repository's security advisories as well as running npm audit; a registry report does not establish that every repository advisory is covered. Declare plugin version requirements and dependencies through fastify-plugin, and fail startup when register() or ready() reports an incompatible or missing dependency.

Request schemas and validation

  • Use full JSON Schemas for params, querystring, headers, and body; specify the actual type, required fields, and size/range bounds. Use type: 'object' for object contracts rather than the removed shorthand syntax.
  • Require rejection of unknown command fields with additionalProperties: false and ajv.customOptions.removeAdditional: false, or an equivalent per-part validator. Fastify's default removeAdditional: true silently strips those fields instead of rejecting the request.
  • Account for default