LiquidJS 10
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
3prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- 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(), orevalValue()input; treat expression strings accepted by*_expfilters as template code too. - Set absolute, server-owned
root,partials, andlayoutsdirectories 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, andlayout. UsedynamicPartials: falsefor static relationships, but do not treat it as an authorization boundary: filename interpolation remains possible.extnamesupplies a default suffix, not an extension allowlist. - Implement both
contains()andcontainsSync()for a customfswhen both API modes are used; an omitted method permits candidates in that mode. Enforce containment or tenant ownership for every resolved candidate, includingfallback()results, and bound any remote loader's requests and response size. - Build a trusted, tenant-scoped
templatesmap with a null prototype and approved own keys. This map replacesfsand bypassesroot,partials,layouts,