mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Fix library tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassValue cls, string description
|
from ClassValue cls, string description
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from string txt, Value val
|
from string txt, Value val
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from FunctionValue v, string name
|
from FunctionValue v, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Value val, string name
|
from Value val, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode call, Value func
|
from ControlFlowNode call, Value func
|
||||||
where call = func.getACall()
|
where call = func.getACall()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from CallNode call, CallableValue callable, int i
|
from CallNode call, CallableValue callable, int i
|
||||||
select call.getLocation().getStartLine(), call.toString(), callable.toString(), i,
|
select call.getLocation().getStartLine(), call.toString(), callable.toString(), i,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from CallNode call, CallableValue callable, string name
|
from CallNode call, CallableValue callable, string name
|
||||||
select call.getLocation().getStartLine(), call.toString(), callable.toString(), name,
|
select call.getLocation().getStartLine(), call.toString(), callable.toString(), name,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from CallableValue callable, int i
|
from CallableValue callable, int i
|
||||||
select callable.toString(), i, callable.getParameter(i).toString()
|
select callable.toString(), i, callable.getParameter(i).toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from CallableValue callable, string name
|
from CallableValue callable, string name
|
||||||
select callable.toString(), name, callable.getParameterByName(name).toString()
|
select callable.toString(), name, callable.getParameterByName(name).toString()
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import semmle.python.objects.ObjectInternal
|
|
||||||
|
|
||||||
from NameNode f, Context ctx, ObjectInternal v
|
from NameNode f, Context ctx, ObjectInternal v
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from CallNode call, FunctionObject func, string kind
|
from CallNode call, FunctionObject func, string kind
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from FunctionObject f
|
from FunctionObject f
|
||||||
where f.neverReturns()
|
where f.neverReturns()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Call c, FunctionObject f
|
from Call c, FunctionObject f
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
string repr(Object o) {
|
string repr(Object o) {
|
||||||
not o instanceof StringObject and not o = theBoundMethodType() and result = o.toString()
|
not o instanceof StringObject and not o = theBoundMethodType() and result = o.toString()
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import semmle.python.pointsto.PointsToContext
|
|
||||||
import semmle.python.objects.ObjectInternal
|
|
||||||
|
|
||||||
from ControlFlowNode f, PointsToContext ctx, Value obj, ControlFlowNode orig
|
from ControlFlowNode f, PointsToContext ctx, Value obj, ControlFlowNode orig
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject base, int n
|
from ClassObject cls, ClassObject base, int n
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Call c, FunctionObject f
|
from Call c, FunctionObject f
|
||||||
where f.getACall().getNode() = c
|
where f.getACall().getNode() = c
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string name
|
from ClassObject cls, string name
|
||||||
where class_declares_attribute(cls, name)
|
where class_declares_attribute(cls, name)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject meta
|
from ClassObject cls, ClassObject meta
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject sup
|
from ClassObject cls, ClassObject sup
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string reason
|
from ClassObject cls, string reason
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string style
|
from ClassObject cls, string style
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
private import semmle.python.objects.ObjectInternal
|
private import LegacyPointsTo
|
||||||
|
|
||||||
/** An unknown type. Not usually visible. */
|
/** An unknown type. Not usually visible. */
|
||||||
class UnknownType extends UnknownClassInternal {
|
class UnknownType extends UnknownClassInternal {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode call, FunctionObject func
|
from ControlFlowNode call, FunctionObject func
|
||||||
where call = func.getACall()
|
where call = func.getACall()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassMethodObject cm, CallNode call
|
from ClassMethodObject cm, CallNode call
|
||||||
where call = cm.getACall()
|
where call = cm.getACall()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Scope s, string name, Object val
|
from Scope s, string name, Object val
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
/* This test should return _no_ results. */
|
/* This test should return _no_ results. */
|
||||||
predicate relevant_node(ControlFlowNode n) {
|
predicate relevant_node(ControlFlowNode n) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode f, ControlFlowNode x
|
from ControlFlowNode f, ControlFlowNode x
|
||||||
where PointsTo::pointsTo(f, _, ObjectInternal::unknown(), x)
|
where PointsTo::pointsTo(f, _, ObjectInternal::unknown(), x)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import semmle.python.pointsto.PointsToContext
|
|
||||||
|
|
||||||
from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x, PointsToContext ctx
|
from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x, PointsToContext ctx
|
||||||
where PointsTo::points_to(f, ctx, o, c, x)
|
where PointsTo::points_to(f, ctx, o, c, x)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Util
|
import Util
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x
|
from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x
|
||||||
where PointsTo::points_to(f, _, o, c, x)
|
where PointsTo::points_to(f, _, o, c, x)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
private import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from ControlFlowNode f, Context ctx
|
from ControlFlowNode f, Context ctx
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
private import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
private import semmle.python.pointsto.PointsToContext
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
predicate ssa_variable_points_to(
|
predicate ssa_variable_points_to(
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from SsaSourceVariable var, ControlFlowNode use, BasicBlock pred
|
from SsaSourceVariable var, ControlFlowNode use, BasicBlock pred
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from SsaSourceVariable var, ControlFlowNode defn, string kind
|
from SsaSourceVariable var, ControlFlowNode defn, string kind
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
private import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
private import semmle.python.objects.ObjectInternal
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from EssaVariable var, string name, ObjectInternal o, Context ctx
|
from EssaVariable var, string name, ObjectInternal o, Context ctx
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from EssaVariable var, ControlFlowNode use
|
from EssaVariable var, ControlFlowNode use
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import semmle.python.pointsto.PointsToContext
|
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from
|
from
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.objects.ObjectInternal
|
private import LegacyPointsTo
|
||||||
|
|
||||||
bindingset[which]
|
bindingset[which]
|
||||||
string locate(Location l, string which) {
|
string locate(Location l, string which) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
import Util
|
import Util
|
||||||
|
|
||||||
from SsaSourceVariable var, ControlFlowNode use
|
from SsaSourceVariable var, ControlFlowNode use
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonFunctionValue func
|
from PythonFunctionValue func
|
||||||
select func, func.getACall()
|
select func, func.getACall()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleValue mv, ControlFlowNode ref, string local_external
|
from ModuleValue mv, ControlFlowNode ref, string local_external
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleValue mv, ControlFlowNode ref, string in_stdlib, string local_external, string is_missing
|
from ModuleValue mv, ControlFlowNode ref, string in_stdlib, string local_external, string is_missing
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PyFunctionObject f
|
from PyFunctionObject f
|
||||||
select f.toString(), f.getAnInferredReturnType().toString()
|
select f.toString(), f.getAnInferredReturnType().toString()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Value sup, Value cls
|
from Value sup, Value cls
|
||||||
where Expressions::requireSubClass(cls, sup)
|
where Expressions::requireSubClass(cls, sup)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from SelfAttributeRead sa, int line, string g, string l
|
from SelfAttributeRead sa, int line, string g, string l
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string abstract
|
from ClassObject cls, string abstract
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name, Object obj
|
from ClassObject cls, int line, string name, Object obj
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name, Object obj
|
from ClassObject cls, int line, string name, Object obj
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name
|
from ClassObject cls, int line, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name
|
from ClassObject cls, int line, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, Object obj
|
from ClassObject cls, int line, Object obj
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.MRO
|
import semmle.python.pointsto.MRO
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassValue cls
|
from ClassValue cls
|
||||||
where not cls.isBuiltin()
|
where not cls.isBuiltin()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.dependencies.Dependencies
|
import semmle.python.dependencies.Dependencies
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from DependencyKind dk, AstNode src, Object target
|
from DependencyKind dk, AstNode src, Object target
|
||||||
where dk.isADependency(src, target)
|
where dk.isADependency(src, target)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string kind
|
from ClassObject cls, string kind
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
int lineof(Object o) { result = o.getOrigin().getLocation().getStartLine() }
|
int lineof(Object o) { result = o.getOrigin().getLocation().getStartLine() }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PropertyValue p, string method_name, FunctionValue method
|
from PropertyValue p, string method_name, FunctionValue method
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ExceptFlowNode ex, Value val
|
from ExceptFlowNode ex, Value val
|
||||||
where ex.handledException(val, _, _)
|
where ex.handledException(val, _, _)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string legal
|
from ClassObject cls, string legal
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from string name, int mcnt
|
from string name, int mcnt
|
||||||
where mcnt = strictcount(Module m | m.getName() = name) and mcnt > 1
|
where mcnt = strictcount(Module m | m.getName() = name) and mcnt > 1
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Object o, string name
|
from Object o, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonFunctionValue f, string overriding, string overridden
|
from PythonFunctionValue f, string overriding, string overridden
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import Lib
|
import Lib
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode f, TrackableState state, Context ctx, boolean sense
|
from ControlFlowNode f, TrackableState state, Context ctx, boolean sense
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.dataflow.TaintTracking
|
import semmle.python.dataflow.TaintTracking
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
class SimpleTest extends TaintKind {
|
class SimpleTest extends TaintKind {
|
||||||
SimpleTest() { this = "simple.test" }
|
SimpleTest() { this = "simple.test" }
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import python
|
|||||||
import semmle.python.dataflow.TaintTracking
|
import semmle.python.dataflow.TaintTracking
|
||||||
import TaintLib
|
import TaintLib
|
||||||
import semmle.python.dataflow.Implementation
|
import semmle.python.dataflow.Implementation
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from
|
from
|
||||||
TaintTrackingImplementation config, TaintTrackingNode src, CallNode call,
|
TaintTrackingImplementation config, TaintTrackingNode src, CallNode call,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.dataflow.Implementation
|
import semmle.python.dataflow.Implementation
|
||||||
import TaintLib
|
import TaintLib
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleValue m, string name, TaintedNode origin, TaintTrackingImplementation impl
|
from ModuleValue m, string name, TaintedNode origin, TaintTrackingImplementation impl
|
||||||
where impl.moduleAttributeTainted(m, name, origin)
|
where impl.moduleAttributeTainted(m, name, origin)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.dataflow.TaintTracking
|
import semmle.python.dataflow.TaintTracking
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
class SimpleTest extends TaintKind {
|
class SimpleTest extends TaintKind {
|
||||||
SimpleTest() { this = "simple.test" }
|
SimpleTest() { this = "simple.test" }
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject start, string name, Object val
|
from ClassObject cls, ClassObject start, string name, Object val
|
||||||
where not name.substring(0, 2) = "__" and val = cls.lookupMro(start, name)
|
where not name.substring(0, 2) = "__" and val = cls.lookupMro(start, name)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string name, string kind
|
from ClassObject cls, string name, string kind
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string name, string kind, Object o
|
from ClassObject cls, string name, string kind, Object o
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string name, string kind, Object o
|
from ClassObject cls, string name, string kind, Object o
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassValue cls, string reason
|
from ClassValue cls, string reason
|
||||||
where Types::failedInference(cls, reason)
|
where Types::failedInference(cls, reason)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls
|
from ClassObject cls
|
||||||
where cls.hasDuplicateBases()
|
where cls.hasDuplicateBases()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r, Scope s, ClassObject cls
|
from RaisingNode r, Scope s, ClassObject cls
|
||||||
where r.viableExceptionalExit_objectapi(s, cls)
|
where r.viableExceptionalExit_objectapi(s, cls)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ExceptFlowNode n, ClassObject cls
|
from ExceptFlowNode n, ClassObject cls
|
||||||
where n.handles_objectapi(cls)
|
where n.handles_objectapi(cls)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r, ControlFlowNode n, string kind
|
from RaisingNode r, ControlFlowNode n, string kind
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r, string type
|
from RaisingNode r, string type
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PyFunctionObject f, string type
|
from PyFunctionObject f, string type
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ReraisingNode r
|
from ReraisingNode r
|
||||||
select r.getLocation().getStartLine(), r, r.getARaisedType().toString()
|
select r.getLocation().getStartLine(), r, r.getARaisedType().toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r, ControlFlowNode n, ClassObject ex
|
from RaisingNode r, ControlFlowNode n, ClassObject ex
|
||||||
where r.viableExceptionEdge_objectapi(n, ex)
|
where r.viableExceptionEdge_objectapi(n, ex)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonPropertyObject p
|
from PythonPropertyObject p
|
||||||
select p.toString(), p.getDeleter().toString()
|
select p.toString(), p.getDeleter().toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonPropertyObject p
|
from PythonPropertyObject p
|
||||||
select p.toString(), p.getGetter().toString()
|
select p.toString(), p.getGetter().toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonPropertyObject p
|
from PythonPropertyObject p
|
||||||
select p.toString()
|
select p.toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PythonPropertyObject p
|
from PythonPropertyObject p
|
||||||
select p.toString(), p.getSetter().toString()
|
select p.toString(), p.getSetter().toString()
|
||||||
|
|||||||
Reference in New Issue
Block a user