Shopify / Shopify/liquid

Documentation for ResourceLimits feature

Open
#1,836 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

I discovered the ResourceLimits feature while reading through the codebase.

Is there any documentation on this and how to use it effectively? We would like to mitigate against potential denial of service in our application from very large loops or excessive memory usage.

https://github.com/Shopify/liquid/blob/b4196489c2d14a9cedf004c871bb9331fd9d12ba/lib/liquid/resource_limits.rb#L4

It does not see anything in the Wiki or other docs about this, and its not clear what reasonable values might be for an ordinary web application.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/liquid/resource_limits.rb at the linked lines and inspect the ResourceLimits feature in the codebase. Document how to use it effectively for large loops and excessive memory usage, including reasonable values for an ordinary web application. Done means the feature has clear usage and value guidance available outside the code and wiki.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation, security
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.