LiquidJS 10

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

3prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. LiquidJS 1065 lines · 2.6K tokens
Total268 lines · 11K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 88
  • 89
  • 95
  • 113
  • 117
  • 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
  • 674
  • 732
  • 749
  • 770
  • 772
  • 807
  • 829
  • 838
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1321
  • 1333
  • 1336

Prompt Preview

Apply the Node.js 24 prompt first. These rules target LiquidJS 10 and were checked against 10.29.0. Its package declares Node.js >=16 compatibility; use the supported Node.js 24 runtime. Apply browser-loader rules only when using the browser bundle.

Template authority and loading

  • Keep templates, partials, and layouts application-controlled wherever possible. Pass untrusted values as scope data instead of concatenating them into parse(), parseAndRender(), or evalValue() input; treat expression strings accepted by *_exp filters as template code too.
  • Set absolute, server-owned root, partials, and layouts directories instead of the . defaults; retain LiquidJS's built-in Node filesystem containment checks and prevent untrusted writes to those directories and their symlinks.
  • Allowlist the final template names used by renderFile(), parseFile(), include, render, and layout. Use dynamicPartials: false for static relationships, but do not treat it as an authorization boundary: filename interpolation remains possible. extname supplies a default suffix, not an extension allowlist.
  • Implement both contains() and containsSync() for a custom fs when both API modes are used; an omitted method permits candidates in that mode. Enforce containment or tenant ownership for every resolved candidate, including fallback() results, and bound any remote loader's requests and response size.
  • Build a trusted, tenant-scoped templates map with a null prototype and approved own keys. This map replaces fs and bypasses root, partials, layouts,