pytorch/tools/setup_helpers
kedejesu 53d8778b4d Update clang-format linux hash and yaml import calls (#53932)
Summary:
Fixing Bandit security issues.
- yaml_load: Use of unsafe yaml load. Allows instantiation of arbitrary objects. Consider yaml.safe_load().
Test ID: B506
Severity: MEDIUM
Confidence: HIGH
File: ./caffe2/contrib/aten/gen_op.py
More info: https://bandit.readthedocs.io/en/latest/plugins/b506_yaml_load.html
235 if __name__ == '__main__':
236     decls = yaml.load(read(os.path.join(args.yaml_dir, 'Declarations.yaml')), Loader=Loader)
237     factory_methods = find_factory_methods(decls)

- Blacklist: Use of insecure MD2 (6149a26adb), MD4 (fc7f026980), MD5 (7ea9d9af4e), or SHA1 hash function.
Test ID: B303
Severity: MEDIUM
Confidence: HIGH
File: ./tools/clang_format_utils.py
More info: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b303-md5
36
37     hash = hashlib.sha1()
38

Pull Request resolved: https://github.com/pytorch/pytorch/pull/53932

Reviewed By: jbschlosser

Differential Revision: D27072017

Pulled By: malfet

fbshipit-source-id: 2fef0119388797aee3cacdc880fc345bd2ba68ce
2021-03-18 17:11:58 -07:00
..
__init__.py Remove escape_path in our build system. (#24044) 2019-08-13 20:38:19 -07:00
cmake.py Drop unused imports from leftovers (#49953) 2021-01-04 16:31:48 -08:00
env.py [*.py] Rename "Arguments:" to "Args:" (#49736) 2020-12-28 09:34:47 -08:00
gen_version_header.py Generate header with version #defines for LibTorch (#50073) 2021-02-03 22:18:53 -08:00
gen.py Rewrite of ATen code generator (#42629) 2020-08-31 09:00:22 -07:00
generate_code.py Update clang-format linux hash and yaml import calls (#53932) 2021-03-18 17:11:58 -07:00
numpy_.py Add more comment on NumPy detection in Python scripts. 2019-11-26 17:38:27 -08:00