File tree Expand file tree Collapse file tree
lib/semmle/python/frameworks
test/library-tests/frameworks/stdlib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -428,6 +428,22 @@ private module StdlibPrivate {
428428 // ---------------------------------------------------------------------------
429429 // marshal
430430 // ---------------------------------------------------------------------------
431+ /**
432+ * A call to `marshal.load`
433+ * See https://docs.python.org/3/library/marshal.html#marshal.load
434+ */
435+ private class MarshalLoadCall extends Decoding:: Range , DataFlow:: CallCfgNode {
436+ MarshalLoadCall ( ) { this = API:: moduleImport ( "marshal" ) .getMember ( "load" ) .getACall ( ) }
437+
438+ override predicate mayExecuteInput ( ) { any ( ) }
439+
440+ override DataFlow:: Node getAnInput ( ) { result = this .getArg ( 0 ) }
441+
442+ override DataFlow:: Node getOutput ( ) { result = this }
443+
444+ override string getFormat ( ) { result = "marshal" }
445+ }
446+
431447 /**
432448 * A call to `marshal.loads`
433449 * See https://docs.python.org/3/library/marshal.html#marshal.loads
Original file line number Diff line number Diff line change 99# using this keyword argument is disallowed from Python 3.9
1010pickle .loads (data = payload ) # $ decodeInput=payload decodeOutput=pickle.loads(..) decodeFormat=pickle decodeMayExecuteInput
1111
12- marshal .load (file_ ) # $ MISSING: decodeInput=file_ decodeOutput=marshal.load(..) decodeFormat=marshal decodeMayExecuteInput
12+ marshal .load (file_ ) # $ decodeInput=file_ decodeOutput=marshal.load(..) decodeFormat=marshal decodeMayExecuteInput
1313marshal .loads (payload ) # $ decodeInput=payload decodeOutput=marshal.loads(..) decodeFormat=marshal decodeMayExecuteInput
1414
1515
You can’t perform that action at this time.
0 commit comments