mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
add support for Object.hasOwn(obj, key)
This commit is contained in:
@@ -27,6 +27,8 @@ predicate hasUnknownPropertyRead(LocalObject obj) {
|
||||
or
|
||||
exists(obj.getAPropertyRead("hasOwnProperty"))
|
||||
or
|
||||
obj.flowsTo(DataFlow::globalVarRef("Object").getAMemberCall("hasOwn").getArgument(0))
|
||||
or
|
||||
exists(obj.getAPropertyRead("propertyIsEnumerable"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user