Repository navigation
fix: count any value from another input as foreign unless proven local - #465
Merged
Merged
Conversation
With another input given and this input naming one of its globals, a call, new or tagged template now counts as a possible code runner unless its callee is proven local by an allow-list (literals, this input's functions and their returns, plain literal holders, built-in chains). A non-local value handed to a callee that is not this input's function counts the same. The kept-machinery note names the built-in verdict it comes from.
…es with the foreign-value allow-list
This was referenced Nov 20, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes finding 1 (CRITICAL) and finding 3 (LOW) of review/r6-ml7.md.
With several inputs, a function that another input hands out (for example
(function () {})[k]withk = "constructor") was only caught when it was called directly. Any other route, such as[f()][0](text),(0, f())(text),new (f())(text), a second alias, a pattern, a parameter,for-of,catch, an object field,awaitor.then(f()), let it overwrite the decoder while untwist still inlined the decoded strings.The check is now an allow-list. If an input names another input's global, then every call,
newand tagged template in it counts as a possible code runner unless its callee is proven local: literals, this input's own functions and what they return, plain literal holders, or built-in chains. A value that isn't proven local, passed to a callee that isn't one of this input's functions, counts the same way. Inputs that never name another input's globals are judged as before, and single-input runs are unchanged.The kept-machinery note now says which built-in verdict it comes from (write, hand on, or not judged).
Gates: