Files
codeql/python/ql/test/experimental/library-tests/frameworks/yaml/Decoding.py
Rasmus Lerchedahl Petersen 352418cb5d Python: track safe loaders
2020-10-14 16:33:55 +02:00

7 lines
362 B
Python

import yaml
from yaml import SafeLoader
yaml.load(payload) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML $decodeUnsafe
yaml.load(payload, Loader=SafeLoader) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML
yaml.load(payload, Loader=yaml.BaseLoader) # $decodeInput=payload $decodeOutput=Attribute() $decodeFormat=YAML