Merge pull request #10135 from Pixee-Bot-Python/pixeebot/drip-2023-11-14-pixee-python/harden-pyyaml

Use SafeLoader in yaml.load() Calls
This commit is contained in:
Matthias 2024-04-26 08:35:01 +02:00 committed by GitHub
commit 33454e2f23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,7 @@ type_reqs = [r.strip('\n') for r in requirements if r.startswith(
'types-') or r.startswith('SQLAlchemy')]
with pre_commit_file.open('r') as file:
f = yaml.load(file, Loader=yaml.FullLoader)
f = yaml.load(file, yaml.SafeLoader)
mypy_repo = [repo for repo in f['repos'] if repo['repo']