Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffe79f6

Browse files
yoffRasmusWL
andauthored
Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
1 parent b0ebb5b commit ffe79f6

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

python/ql/src/experimental/semmle/python/Concepts.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module SystemCommandExecution {
4242
/**
4343
* A data-flow node that decodes data from a binary or textual format. This
4444
* is intended to include deserialization, unmarshalling, decoding, unpickling,
45-
* unzipping, decrypting, parsing etc.
45+
* decompressing, decrypting, parsing etc.
4646
*
4747
* Doing so should normally preserve taint, but it can also be a problem
4848
* in itself, e.g. if it allows code execution or could result in deinal-of-service.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import dill
22

3-
dill.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=dill $decodeUnsafe=
4-
dill.loads(payload, encoding='latin1') # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=dill $decodeUnsafe=
3+
dill.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=dill $decodeUnsafe

python/ql/test/experimental/library-tests/frameworks/stdlib/Decoding.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
@app.route("/")
1111
def hello():
1212
payload = request.args.get("payload")
13-
pickle.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=pickle $decodeUnsafe=
14-
pickle.loads(payload, encoding='latin1') # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=pickle $decodeUnsafe=
15-
marshal.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=pickle $decodeUnsafe=
13+
pickle.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=pickle $decodeUnsafe
14+
marshal.loads(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=pickle $decodeUnsafe

python/ql/test/experimental/library-tests/frameworks/yaml/Decoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
@app.route("/")
1111
def hello():
1212
payload = request.args.get("payload")
13-
yaml.load(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML $decodeUnsafe=
13+
yaml.load(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML $decodeUnsafe
1414
yaml.load(payload, Loader=SafeLoader) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML

0 commit comments

Comments
 (0)