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

Use SafeLoader in `yaml.load()` Calls
This commit is contained in:
Pixee OSS Assistant 2024-04-24 18:33:16 -04:00 committed by GitHub
commit 1901da688e
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']