codeql icon indicating copy to clipboard operation
codeql copied to clipboard

JS: Improve detection of classes with escaping instances

Open asgerf opened this issue 1 year ago • 0 comments

A class was erroneously considered to escape into client code if it escaping into a upstream library:

class A {}
module.exports = new A(); // Correct: escapes downstream

class B {}
require('foo')(new B()); // Wrong: escapes upstream, does not need a synthetic name

asgerf avatar Feb 29 '24 10:02 asgerf