File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/stdlib Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,22 @@ private module StdlibPrivate {
428
428
// ---------------------------------------------------------------------------
429
429
// marshal
430
430
// ---------------------------------------------------------------------------
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
+
431
447
/**
432
448
* A call to `marshal.loads`
433
449
* See https://docs.python.org/3/library/marshal.html#marshal.loads
Original file line number Diff line number Diff line change 9
9
# using this keyword argument is disallowed from Python 3.9
10
10
pickle .loads (data = payload ) # $ decodeInput=payload decodeOutput=pickle.loads(..) decodeFormat=pickle decodeMayExecuteInput
11
11
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
13
13
marshal .loads (payload ) # $ decodeInput=payload decodeOutput=marshal.loads(..) decodeFormat=marshal decodeMayExecuteInput
14
14
15
15
You can’t perform that action at this time.
0 commit comments