Skip to content

JS: Relax instantiation requirement for .prototype field#1050

Merged
semmle-qlci merged 4 commits into
github:rc/1.20from
asger-semmle:prototype-instance-methods
Mar 7, 2019
Merged

JS: Relax instantiation requirement for .prototype field#1050
semmle-qlci merged 4 commits into
github:rc/1.20from
asger-semmle:prototype-instance-methods

Conversation

@asger-semmle
Copy link
Copy Markdown
Contributor

@asger-semmle asger-semmle commented Mar 6, 2019

Allows tracking of values through the .prototype property of a function, even if we can't see a constructor invocation of that function.

Evaluation shows a new result, and also indicates that there is a modest cost to doing this. The cost is spread across all of the taint-tracking queries, suggesting that this is simply because the call graph is more complete now, and not because it takes a longer time to construct the call graph.

I'd like to get this into 1.20 as it is needed at a client, and can't easily be handled without modifying the standard libraries.

@asger-semmle asger-semmle added the JS label Mar 6, 2019
@asger-semmle asger-semmle added this to the 1.20 milestone Mar 6, 2019
@asger-semmle asger-semmle marked this pull request as ready for review March 7, 2019 11:28
@asger-semmle asger-semmle requested a review from a team as a code owner March 7, 2019 11:28
xiemaisi
xiemaisi previously approved these changes Mar 7, 2019
@@ -49,7 +49,6 @@ AbstractValue getAnInitialPropertyValue(DefiniteAbstractValue baseVal, string pr
or
// `f.prototype` for functions `f` that are instantiated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hang on, this comment still needs updating.

@semmle-qlci semmle-qlci merged commit 9dccd9f into github:rc/1.20 Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants