File tree Expand file tree Collapse file tree
lib/semmle/python/frameworks
test/library-tests/frameworks/dill Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,23 @@ private import semmle.python.ApiGraphs
1414 * See https://pypi.org/project/dill/.
1515 */
1616private 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+
1734 /**
1835 * A call to `dill.loads`
1936 * See https://pypi.org/project/dill/ (which currently refers you
Original file line number Diff line number Diff line change 11import dill
22
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
55dill .loads (payload ) # $ decodeInput=payload decodeOutput=dill.loads(..) decodeFormat=dill decodeMayExecuteInput
66dill .loads (str = payload ) # $ decodeInput=payload decodeOutput=dill.loads(..) decodeFormat=dill decodeMayExecuteInput
You can’t perform that action at this time.
0 commit comments