Skip to content

Releases

v0.61.0: executorch_pte_scan 0.1.1 (runtime dtype list)

Choose a tag to compare

@munimv2 munimv2 released this 15 Nov 09:18

executorch_pte_scan 0.1.1. The scanner's dtype table now follows the ExecuTorch runtime's ScalarType list (values 0-29, ET_FORALL_SCALAR_TYPES), which is what the runtime's tensor parser accepts. 0.1.0 followed schema/scalar_type.fbs, which lists the complex (8-10) and bits (18-21) types only as comments, so it raised PTE004 on 15 of 448 published .pte files (all ComplexFloat, mostly audio preprocessors). Those tensors now get the same size checks as any other; a value outside 0-29 is still PTE004. Checked twice before release: real published files (job pte-dtype-v1, REALFILE_CHECK_PTE_DTYPE_2026-11.md; its source-table row failed on a grader bug, so nothing shipped then) and ExecuTorch's source with a corrected grader (job pte-dtype-v2, research/RESULTS_PTE_DTYPE_V2_2026-11.md, 7 of 7 rows held). model_file_scan stays 0.14.0. A clean scan means the structure is consistent; it does not mean a program is safe. Made with AI agents working in the name of MV2 of Munim, Inc. Apache-2.0.

v0.60.0: raw weights in torch.export files are read as data

Choose a tag to compare

@munimv2 munimv2 released this 11 Nov 03:57

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

  • A torch.export (.pt2) file keeps its weights under data/weights/ and its lifted tensor constants under data/constants/, with a JSON config that says, per tensor, which member holds it and whether it is pickled (use_pickle). torch.export.load reads a use_pickle-false payload as raw bytes. Since 0.9.0 the scanner follows that config: such members are treated as data, as raw tensor storages of torch.save files have been since 0.6.0.
  • Up to 0.8.0 every such tensor whose first byte happened to be 0x80 got a false PKL000 LOW 'could not be fully parsed' note (nine on a small honest network whose first weight values were 1.0000153).
  • Unchanged on purpose: payloads declared use_pickle true (tensor subclasses), payloads no config names, and every payload of an archive with AOTInductor files (data/aotinductor/) are still read as pickles. Findings on TorchScript, PyTorch mobile and torch.save files are unchanged.

Pre-registered check (research/PREREG_PT2_WEIGHTS.md), graded in REALFILE_CHECK_PT2_WEIGHTS_2026-11.md: 12 of 12 release rows and both diagnostic rows held on files written and loaded by torch 2.15's own writers and loaders in a sealed container; 1,468 unit tests pass (1,452 before).

Apache-2.0.

v0.59.0: zips inside model archives are opened and scanned

Choose a tag to compare

@munimv2 munimv2 released this 11 Nov 01:28

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

  • A zip member that is itself a zip is now opened and scanned as a zip, up to two levels below the outer file. The common case is torch.export: every .pt2 stores its sample inputs as a complete torch.save file at data/sample_inputs/model.pt. Up to 0.7.0 that member was read as one pickle stream, so every honest .pt2 got a PKL000 LOW 'could not be fully parsed' note and the pickle inside it was never read. Findings inside carry the full path (file.pt2!model/data/sample_inputs/model.pt!archive/data.pkl).
  • A member that starts with the zip magic but does not open as a zip, and every raw tensor storage, is read exactly as before. Findings on TorchScript, PyTorch mobile and torch.save files are unchanged.

Pre-registered check (research/PREREG_PT2_NEST.md), graded in REALFILE_CHECK_PT2_NEST_2026-11.md: 11 of 11 release rows held on files written and loaded by torch 2.15's own writers and loaders in a sealed container; 1,452 unit tests pass (1,444 before).

Known gap, pre-registered as pt2-weights-v1 (research/PREREG_PT2_WEIGHTS.md): a .pt2 whose raw weights start with byte 0x80 still gets one PKL000 LOW note per such weight.

Also measured (RESULTS_PT2_CENSUS_2026-11.md): no .pt2, .torchscript or .ptl file among the 9,865 open models in the 10,000 most downloaded pytorch-tagged models on the Hugging Face Hub (11 Nov 2026); 98.7% of open executorch-tagged models ship a .pte.

Apache-2.0.

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

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.

v0.57.0: raw tensor storages in PyTorch zip files are no longer read as pickles

Choose a tag to compare

@munimv2 munimv2 released this 10 Nov 02:22

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

  • pickle_model_scan 0.6.0: in a zip-format PyTorch file, torch.load unpickles only <prefix>/data.pkl and copies each tensor storage <prefix>/data/<key> as raw bytes. Up to 0.5.0 the scanner walked any zip member whose first byte is 0x80 as a pickle, so a storage that happened to start with 0x80 (for example BatchNorm's num_batches_tracked after 128 batches) got a false PKL000 LOW saying the stream could not be fully parsed. 0.6.0 skips only that first-byte sniff, and only for <prefix>/data/<key> members of a zip that holds <prefix>/data.pkl. Every data.pkl, every member with a pickle extension and every zip without a data.pkl is read exactly as before. No rule or severity changed.
  • model-file-scan 0.13.2: version bump only.

Pre-registered check zip-data-v1 (REALFILE_CHECK_ZIP_DATA_2026-11.md), graded against what torch.load reads on files torch wrote: all 11 release rows held. On 229 files the only difference between 0.5.0 and 0.6.0 is the removed storage-member findings. 8 of the 21 most downloaded zip-format pytorch_model.bin files we read (38%) got the false note from 0.5.0 and none from 0.6.0. Two graded, non-gating predictions failed: only 21 published files fitted the download budget (predicted at least 30), and 25 of 3,658 published storages (0.68%) start with 0x80 (predicted 0.2-0.6%). Full suite on the patched tree: 1,431 tests, 0 failures.

Still open, each queued for its own check: an honest TorchScript file gets PKL003 MEDIUM for its own __torch__ class names, and a torch.export .pt2 can get a PKL000 LOW on non-pickle members.

A clean scan is not a guarantee of safety: pickle-based formats can run code when loaded, so only load files from sources you trust. Apache-2.0.

v0.56.0: legacy-format PyTorch files and .nemo checkpoints are read to the last pickle

Choose a tag to compare

@munimv2 munimv2 released this 09 Nov 20:07

model-file-scan 0.13.1, pickle_model_scan 0.5.0, nemo_container_scan 0.3.0. Made with AI agents working in the name of MV2 of Munim, Inc.

  • pickle_model_scan 0.5.0 walks every pickle the loader reads, not just the first. torch.save(..., _use_new_zipfile_serialization=False) (the legacy format, the default before PyTorch 1.6, still read by torch.load) writes five pickles back to back and then raw tensor bytes. Up to 0.4.0 the scanner read only the 15-byte magic-number pickle and reported such a file clean without seeing any import. Files written with several pickle.dump calls are now walked one stream after another. New keys streams and torch_legacy in pickle_walk(). No new rule and no severity change.
  • nemo_container_scan 0.3.0 does the same for a legacy-format model_weights.ckpt inside a .nemo tar. 0.2.0 reported nothing at all for one, not even the NEMO010 note a zip-format checkpoint gets. It now reports NEMO010 with "legacy torch.save, 5 of 5 pickles".
  • model-file-scan 0.13.1: version bump only. Routing and every other scanner are unchanged.

Pre-registered checks, graded against torch.load / pickle.load on honest files:

  • legacy-torch-v1, 19 of 19 held (REALFILE_CHECK_LEGACY_TORCH_2026-11.md). 0.5.0 ends its walk exactly where the loader's last pickle ends and resolves every import the loader asked for on all 8 files with ground truth. Among the 500 pytorch_model.bin headers read from the 1,000 most downloaded pytorch models on the Hugging Face Hub, 79 (15.8%) are legacy format, among them gpt2, bert-base-uncased and t5-small. On four small ones 0.4.0 read 15 bytes and 0.5.0 read the whole pickle.
  • nemo-legacy-v1, all 12 release rows held (REALFILE_CHECK_NEMO_LEGACY_2026-11.md). All 280 weights members in 55 published .nemo files are zip format, none legacy, so this closes a silent case for private or older checkpoints.

Each fix's full suite ran on its own tree (1,396 and 1,397 tests, 0 failures). Before commit, the changed modules' tests ran together on this release's files.

A clean scan is not a guarantee of safety: pickle-based formats can run code when loaded, so only load files from sources you trust. Apache-2.0.

v0.55.0: folder walks no longer skip checkpoint.pth.tar, .pdparams and compressed joblib files

Choose a tag to compare

@munimv2 munimv2 released this 09 Nov 11:27

model-file-scan 0.13.0 (pickle_model_scan 0.4.0 unchanged). Made with AI agents working in the name of MV2 of Munim, Inc.

  • A folder scan now keeps *.pth.tar / *.pt.tar / *.ckpt.tar (torch.save checkpoints as pytorch/examples names them), .pdparams / .pdopt (paddle.save) and *.pkl / *.pickle / *.joblib ending in .z, .gz, .bz2, .xz, .lzma or .lz4 (joblib.dump picks the compressor from the name). Before, a folder holding only such files printed "no model files found" and exited 0, so a CI gate reported it as checked when nothing was read.
  • Nothing else changes: explicit-file scans, routing and every scanner are the same (38 files compared, no difference).
  • Known limit: a bare model.gz is still skipped by a folder walk (a bare .gz is too broad); name it explicitly to scan it.

Pre-registered check walk-names-v2, 15 of 15 rows held (REALFILE_CHECK_WALK_NAMES_V2_2026-11.md): every file written and re-loaded by torch 2.15, paddlepaddle 3.3.1 and joblib 1.6.0 is now kept; 25 of 25 published .pdparams/.pdopt files scanned with no finding; plain .tar/.tar.gz/.txt.gz/.tar.xz files are still skipped; the full suite (1,390 tests) passed.

A clean scan is not a guarantee of safety: pickle-based formats have no safe load mode, so only load files from sources you trust. Apache-2.0.

v0.54.0: the pickle scanner reads joblib files to the end

Choose a tag to compare

@munimv2 munimv2 released this 08 Nov 23:13

pickle_model_scan 0.4.0 / model-file-scan 0.12.1. Made with AI agents working in the name of MV2 of Munim, Inc.

  • joblib.dump files are walked the way joblib.load reads them: numeric arrays are skipped by the size their pickled shape and dtype give, object-dtype arrays are walked as nested pickles with their own memo. Before, the walk stopped at the first array.
  • STACK_GLOBAL operands fetched from the pickle memo are resolved, which removes the PKL007 HIGH false alarm on honest protocol 4/5 pickles (paddle.save, scikit-learn, pandas).
  • New PKL008 MEDIUM: a joblib array could not be sized, so the rest of the file was not analysed (reported, never a quiet stop).
  • joblib's xz and lzma compression are now opened (standard library). lz4 stays PKL006 LOW (unscanned).
  • New pickle_walk(data) reports the imports resolved, the byte offset reached and the arrays skipped.

Pre-registered check pkl-joblib-v1, 16 of 16 rows held (REALFILE_CHECK_PKL_JOBLIB_2026-11.md): imports matched joblib.load on all 18 honest files; 28 of 28 published joblib files walked to the last byte (a plain opcode walk read a median 0.4%); PKL007 on published files went from 24 of 30 to 0; the full suite (1,381 tests) passed.

A clean scan is not a guarantee of safety: joblib.load and pickle.load have no safe mode, so only load files from sources you trust. Apache-2.0.

v0.53.1: ONNX external-data scanners check local functions, training graphs and big single-file models

Choose a tag to compare

@munimv2 munimv2 released this 07 Nov 12:34

onnx's loader also loads external data for tensors inside a model's local functions (ModelProto.functions), and onnx.save_model(..., save_as_external_data=True, convert_attribute=True) writes them that way. Up to 0.1.0, onnx_external_data_scan and onnx_external_data_key_scan walked only ModelProto.graph, so a location the loader follows was never checked. 0.2.0 also walks function nodes, function attribute_proto and both training_info graphs.

0.1.0 also read at most 256 MiB of a model file and stopped quietly. Among .onnx files in the 100 most-downloaded Hugging Face repos tagged onnx, 174 of 555 (31%) are between 256 MiB and 2 GiB (file-size metadata only). 0.2.0 reads up to protobuf's 2 GiB message limit in 16 MiB chunks and reports OED006 (medium) above it instead of passing quietly.

Pre-registered real-file check (job oed-functions-v2, onnx 1.23.2): 13 of 13 held. https://github.com/munimtechnologies/keras-model-scan/blob/main/REALFILE_CHECK_OED_FUNCTIONS_2026-11.md
Release gate on the v0.53.0 tree (job gate-oed-v1): 3 of 3 held; 1,354 tests, 0 failures, 3 skipped, exactly as predicted. https://github.com/munimtechnologies/keras-model-scan/blob/main/REALFILE_CHECK_RELEASE_GATE_OED_2026-11.md

Limits: current onnx releases check external-data paths themselves, so these findings are defence in depth for a CI pipeline, not evidence of an onnx bug. promptfoo's ModelAudit already walked functions and training graphs; this brings our gate up to that. model-file-scan stays 0.12.0.

GitHub Action: uses: munimtechnologies/keras-model-scan@v0.53.1

Licence: Apache-2.0. Made with AI agents working in the name of MV2 of Munim, Inc. (mv2@munimtech.com).

v0.53.0: nemo_container_scan 0.2.0 checks NeMo checkpoints of any size

Choose a tag to compare

@munimv2 munimv2 released this 07 Nov 03:16

A .nemo file is a tar holding model_weights.ckpt, a torch-save zip whose data.pkl NeMo's restore_from unpickles. nemo_container_scan 0.1.0 skipped any tar member larger than 256 MiB with no finding, so for a model with a bigger checkpoint the scan came back clean, while a smaller honest model got NEMO010. Among the 100 most-downloaded Hugging Face repos tagged nemo, 258 of 264 .nemo files (97.7%; 57 of 63 repos) are larger than 256 MiB (file size used as a stand-in for checkpoint size).

0.2.0 opens the checkpoint zip in place inside the tar and reads only its directory and *.pkl entries, so a checkpoint of any size is checked, and scan_file streams the tar from disk. Two new medium findings replace the silent skips: NEMO030 (a pickle still too big to check) and NEMO031 (more members than MAX_MEMBERS).

Pre-registered real-file check (job nemo-big-v1): 12 of 12 predictions held. On nvidia/parakeet-tdt_ctc-110m (459 MB), 0.1.0 reported nothing and peaked at 967.8 MB of memory; 0.2.0 reports NEMO010 in 0.14 s at 19.0 MB. https://github.com/munimtechnologies/keras-model-scan/blob/main/REALFILE_CHECK_NEMO_BIG_2026-11.md

The full test suite ran in the sealed job on the v0.52.1 tree with this patch: 1,338 tests, 0 failures, 3 skipped. model-file-scan stays 0.12.0. Prior art: promptfoo's ModelAudit marks NeMo checkpoints above 50 MB inconclusive (fails closed); our 0.1.0 failed open.

GitHub Action: uses: munimtechnologies/keras-model-scan@v0.53.0

Licence: Apache-2.0. Made with AI agents working in the name of MV2 of Munim, Inc. (mv2@munimtech.com).