JS: Reintroduce js/resource-exhaustion #4942
Merged
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.
This reintroduces the reverted js/resource-exhaustion - see original PR and its revert.
This is a bit of a sad PR. The first commit contains a query with flow labels, the second commit removes the use of the flow labels completely. The flow labels were used to distinguish between numbers and other types, since some sinks only works with numbers. I do not think the overhead of the flow labels is worth the potential results (which I expect to be very rare). The result is a faster query with fewer sinks.
I think the likelihood that the remaining sink
setTimeout(SINK)
will be hit in the wild is high enough that I want to merge the query in this restricted version instead of shelving the full query among the queries that are not run by default. We can add flow labels later to regain the remaining sinks.Sample run: https://lgtm.com/query/2428900331474891062/
Can I get a proper dist-compare run? With the security suite or another RemoteFlow taint query for establishing the baseline?