mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: Accept rewrite for _join( predicates
Co-authored-by: yoff <lerchedahl@gmail.com>
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
7c242b1409
commit
4f3876f184
@@ -854,14 +854,9 @@ private module MethodCalls {
|
||||
private predicate directCall_join(
|
||||
CallNode call, string functionName, Class cls, AttrRead attr, Node self
|
||||
) {
|
||||
(
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(classTracker(cls), functionName)
|
||||
or
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(classInstanceTracker(cls), functionName)
|
||||
) and
|
||||
attr.accesses(self, functionName)
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(self, functionName) and
|
||||
self in [classTracker(cls), classInstanceTracker(cls)]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -886,14 +881,9 @@ private module MethodCalls {
|
||||
private predicate callWithinMethodImplicitSelfOrCls_join(
|
||||
CallNode call, string functionName, Class classWithMethod, AttrRead attr, Node self
|
||||
) {
|
||||
(
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(clsTracker(classWithMethod), functionName)
|
||||
or
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(selfTracker(classWithMethod), functionName)
|
||||
) and
|
||||
attr.accesses(self, functionName)
|
||||
call.getFunction() = attrReadTracker(attr).asCfgNode() and
|
||||
attr.accesses(self, functionName) and
|
||||
self in [clsTracker(classWithMethod), selfTracker(classWithMethod)]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user