Liquid 5.13.0
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- Ruby 4.0124 lines · 4.3K tokens
- 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::Environmentfor each trust profile withLiquid::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:toLiquid::Template.parse. Do not use deprecatedLiquid::Template.register_tag,register_filter, orfile_system=globals, and never useLiquid::Environment.dangerously_overridearound 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 includeLiquid::StandardFiltersautomatically, 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