File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/dill Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,23 @@ private import semmle.python.ApiGraphs
14
14
* See https://pypi.org/project/dill/.
15
15
*/
16
16
private module Dill {
17
+ /**
18
+ * A call to `dill.load`
19
+ * See https://pypi.org/project/dill/ (which currently refers you
20
+ * to https://docs.python.org/3/library/pickle.html#pickle.load)
21
+ */
22
+ private class DillLoadCall extends Decoding:: Range , DataFlow:: CallCfgNode {
23
+ DillLoadCall ( ) { this = API:: moduleImport ( "dill" ) .getMember ( "load" ) .getACall ( ) }
24
+
25
+ override predicate mayExecuteInput ( ) { any ( ) }
26
+
27
+ override DataFlow:: Node getAnInput ( ) { result in [ this .getArg ( 0 ) , this .getArgByName ( "file" ) ] }
28
+
29
+ override DataFlow:: Node getOutput ( ) { result = this }
30
+
31
+ override string getFormat ( ) { result = "dill" }
32
+ }
33
+
17
34
/**
18
35
* A call to `dill.loads`
19
36
* See https://pypi.org/project/dill/ (which currently refers you
Original file line number Diff line number Diff line change 1
1
import dill
2
2
3
- dill .load (file_ ) # $ MISSING: decodeInput=file_ decodeOutput=dill.loads (..) decodeFormat=dill decodeMayExecuteInput
4
- dill .load (file = file_ ) # $ MISSING: decodeInput=file_ decodeOutput=dill.loads (..) decodeFormat=dill decodeMayExecuteInput
3
+ dill .load (file_ ) # $ decodeInput=file_ decodeOutput=dill.load (..) decodeFormat=dill decodeMayExecuteInput
4
+ dill .load (file = file_ ) # $ decodeInput=file_ decodeOutput=dill.load (..) decodeFormat=dill decodeMayExecuteInput
5
5
dill .loads (payload ) # $ decodeInput=payload decodeOutput=dill.loads(..) decodeFormat=dill decodeMayExecuteInput
6
6
dill .loads (str = payload ) # $ decodeInput=payload decodeOutput=dill.loads(..) decodeFormat=dill decodeMayExecuteInput
You can’t perform that action at this time.
0 commit comments