Files
codeql/python/ql/examples/snippets/new_instance.ql
2019-07-26 17:47:11 +02:00

16 lines
286 B
Plaintext

/**
* @name Create new object
* @description Finds places where we create a new instanceof `MyClass`
* @tags call
* constructor
* new
*/
import python
from Call new, ClassObject cls
where
cls.getName() = "MyClass" and
new.getFunc().refersTo(cls)
select new