Liquid 5.13.0

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Ruby 4.0124 lines · 4.3K tokens
  2. Liquid 5.13.080 lines · 3.3K tokens
Total204 lines · 7.6K tokens

CWE Coverage

  • 20
  • 22
  • 23
  • 59
  • 74
  • 78
  • 79
  • 89
  • 95
  • 117
  • 122
  • 134
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 327
  • 338
  • 347
  • 362
  • 367
  • 378
  • 409
  • 416
  • 426
  • 470
  • 502
  • 524
  • 532
  • 639
  • 749
  • 770
  • 772
  • 807
  • 829
  • 862
  • 863
  • 915
  • 916
  • 918
  • 1333
  • 1395

Prompt Preview

Apply the Ruby 4.0 baseline first. For Liquid 5.13.0, the controlled user-template rules below specialize the baseline's trusted-template requirement. They cover the Ruby gem's environments, parsing, rendering, output encoding, drops, extensions, partials, and resource limits.

Template policy and environments

  • Accept user-editable Liquid source only within a deliberately restricted capability boundary. Decide which authors, tenants, data, partials, and extensions may share that boundary before accepting templates.
  • Build a dedicated Liquid::Environment for each trust profile with Liquid::Environment.build; do not use the process-wide default environment to share mutable tags, filters, loaders, or policy between unrelated applications or tenants.
  • Pass the selected environment explicitly as environment: to Liquid::Template.parse. Do not use deprecated Liquid::Template.register_tag, register_filter, or file_system= globals, and never use Liquid::Environment.dangerously_override around concurrent request work.
  • Supply a hash mapping approved tag names to classes in Liquid::Environment.build(tags: ...) when authors do not need every standard tag; register extensions inside the build block.
  • Review the actual environment.filter_method_names: environments include Liquid::StandardFilters automatically, and registering a module exposes its public instance methods, including inherited ones. Keep helper methods private and verify any required filter restriction explicitly.
  • Finalize filter modules, loader configuration, and limit settings before