JavaScript: Fix uses of TypeTracker with custom flow steps.#1176
JavaScript: Fix uses of TypeTracker with custom flow steps.#1176semmle-qlci merged 3 commits intogithub:masterfrom
TypeTracker with custom flow steps.#1176Conversation
These steps need to check that the type hasn't been tracked into a property.
|
We could add a self-returning predicate like This only happens in cases where we're passing |
|
I like that idea a lot! A more descriptive name than |
|
I doubt I'd use it very often, though. I usually just do |
Yes, I'm sure that is in general the more common pattern. However, when tracking the precise origin of flow (and not just the type), it seems dangerous to throw away calling contexts, so that's why I'm doing it this way. |
|
I've encapsulated the Evaluation on socket.io-relevant slugs looks fine. The evaluation was before the last commit, but the DIL changes from that commit look harmless; I can do another sanity check if desired. |
These steps need to check that the type hasn't been tracked into a property.
Before I start testing this, I'd like some feedback on the API. Checking for the property name explicitly is awkward and easy to forget and should probably be encapsulated in an auxiliary predicate, but I'm struggling to come up with an intuitive name and would be grateful for suggestions. Or maybe there is another way to ensure this?