Skip to content

v0.58.0: TorchScript files in folder scans, one PKL040 per TorchScript archive

Choose a tag to compare

@munimv2 munimv2 released this 10 Nov 15:21
· 31 commits to main since this release

model-file-scan 0.14.0, pickle_model_scan 0.7.0. Made with AI agents working in the name of MV2 of Munim, Inc.

  • Folder scans now include TorchScript (.torchscript), PyTorch mobile (.ptl) and torch.export (.pt2) files. Up to 0.13.2 a folder walk skipped them silently; naming them directly already scanned them.
  • An honest TorchScript archive (torch.jit.save or the PyTorch mobile writer) now gets one PKL040 MEDIUM 'TorchScript archive: treat as executable code' instead of one PKL003 per torch class. torch.jit.load builds those classes from code stored in the archive; they are not Python imports. PyTorch's SECURITY.md says to treat TorchScript models like locally executable code from an unknown source, so the severity stays MEDIUM and the default --fail-on medium gate still stops these files. Every other finding (any non-torch import, any other rule or member) is kept.

Pre-registered check (research/PREREG_TS_FIX.md), graded 9 of 9 in REALFILE_CHECK_TS_FIX_2026-11.md: files written and loaded by torch 2.15's own writers and loaders in a sealed container; 1,444 unit tests pass (1,431 before).

Known gap, queued: a torch.export .pt2 still gets one PKL000 LOW note on its non-pickle member data/sample_inputs/model.pt.

Apache-2.0.