mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
Python points-to: Update sanity check.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import python
|
||||
import semmle.python.pointsto.PointsTo
|
||||
import semmle.python.objects.ObjectInternal
|
||||
|
||||
predicate ssa_sanity(string clsname, string problem, string what) {
|
||||
/* Exactly one definition of each SSA variable */
|
||||
@@ -106,15 +107,6 @@ predicate ssa_sanity(string clsname, string problem, string what) {
|
||||
) and
|
||||
problem = "does not have an ImplicitModuleNameDefinition"
|
||||
)
|
||||
or
|
||||
// Unknown value should always have the class unknownType
|
||||
exists(ControlFlowNode f, ClassObject cls |
|
||||
PointsTo::points_to(f, _, unknownValue(), cls, _) and
|
||||
clsname = f.getAQlClass() and
|
||||
cls != theUnknownType() and
|
||||
problem = "unknownValue() has class != theUnknownType()" and
|
||||
what = cls.getName()
|
||||
)
|
||||
}
|
||||
|
||||
from string clsname, string problem, string what
|
||||
|
||||
Reference in New Issue
Block a user