File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
src/semmle/python/web/cherrypy
test/library-tests/web/cherrypy Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,18 @@ import semmle.python.web.Http
3
3
4
4
module CherryPy {
5
5
6
- FunctionObject expose ( ) {
7
- result = ModuleObject :: named ( "cherrypy" ) . attr ( " expose")
6
+ FunctionValue expose ( ) {
7
+ result = Value :: named ( "cherrypy. expose" )
8
8
}
9
9
10
10
}
11
11
12
12
class CherryPyExposedFunction extends Function {
13
13
14
14
CherryPyExposedFunction ( ) {
15
- this .getADecorator ( ) .refersTo ( CherryPy:: expose ( ) )
15
+ this .getADecorator ( ) .pointsTo ( CherryPy:: expose ( ) )
16
16
or
17
- this .getADecorator ( ) .( Call ) .getFunc ( ) .refersTo ( CherryPy:: expose ( ) )
17
+ this .getADecorator ( ) .( Call ) .getFunc ( ) .pointsTo ( CherryPy:: expose ( ) )
18
18
}
19
19
20
20
}
@@ -23,10 +23,10 @@ class CherryPyRoute extends CallNode {
23
23
24
24
CherryPyRoute ( ) {
25
25
/* cherrypy.quickstart(root, script_name, config) */
26
- ModuleObject :: named ( "cherrypy" ) . attr ( " quickstart") .( FunctionObject ) .getACall ( ) = this
26
+ Value :: named ( "cherrypy. quickstart" ) .( FunctionValue ) .getACall ( ) = this
27
27
or
28
28
/* cherrypy.tree.mount(root, script_name, config) */
29
- this .getFunction ( ) .( AttrNode ) .getObject ( "mount" ) .refersTo ( ModuleObject :: named ( "cherrypy" ) . attr ( " tree") )
29
+ this .getFunction ( ) .( AttrNode ) .getObject ( "mount" ) .pointsTo ( Value :: named ( "cherrypy. tree" ) )
30
30
}
31
31
32
32
ClassObject getAppClass ( ) {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class CherryPyExposedFunctionParameter extends TaintSource {
54
54
class CherryPyRequestSource extends TaintSource {
55
55
56
56
CherryPyRequestSource ( ) {
57
- this .( ControlFlowNode ) .refersTo ( ModuleObject :: named ( "cherrypy" ) . attr ( " request") )
57
+ this .( ControlFlowNode ) .pointsTo ( Value :: named ( "cherrypy. request" ) )
58
58
}
59
59
60
60
override predicate isSourceOf ( TaintKind kind ) {
Original file line number Diff line number Diff line change 1
1
| ../../../query-tests/Security/lib/cherrypy/__init__.py:10 | _ThreadLocalProxy() | cherrypy.request |
2
- | ../../../query-tests/Security/lib/cherrypy/__init__.py:10 | request | cherrypy.request |
3
2
| test.py:10 | arg | externally controlled string |
4
3
| test.py:16 | arg | externally controlled string |
You can’t perform that action at this time.
0 commit comments