Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectively short-circuit rendering instead of always doing so when requires are detected [SEC-1323] [INS-4963] #8367

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

godfrzero
Copy link
Contributor

This PR builds on top of #8358 to allow certain inbuilt modules to be required. We probably only need to merge this if we discover there are folks using specific modules and we're unable to provide an acceptable workaround once requires are restricted. A few other things to consider:

  • Is it possible for the input string to be complex enough to cause a ReDoS?
  • We should have test cases to specifically cover scenarios where strings contain no requires, multiple requires, or a mix of allowed and disallowed requires.

@godfrzero godfrzero force-pushed the fix/nunjucks-require-safe branch from d8ec543 to 9290e0a Compare February 13, 2025 05:02
@godfrzero godfrzero removed the request for review from jackkav February 13, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants