← pytorch/pytorch
CodeVetter · Repo Unpack · Risk map

pytorch/pytorch

Scanned commit 5711f1a458 dated 2026-09-22 — last upstream commit. Generated by codevetter codevetter 1.12.0 on 2026-09-22. Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded).

The dominant risks are deserialization and the trust boundary of model artifacts: torch.load is a pickle surface (mitigated by the now-default weights_only mode), TorchScript/mobile artifacts are executable code, and distributed primitives have zero authentication or encryption by design. The project's own SECURITY.md explicitly scopes out crashes/OOB from invalid inputs and cache poisoning, meaning large parts of the C++ kernel surface are intentionally unhardened. Internally, torch/__init__.py is a fragile monolith with import-order constraints and environment mutation (PATH, dlopen flags), serialization depends on vendored miniz internals, and the sprawling CI matrix plus content-hashed Docker images create operational blast radius.