model_scanner__scan_file
Scans a single ML model file for supply-chain risks, including dangerous pickle gadgets, malformed headers, path traversal, Jinja sandbox escapes, and unsafe graph operations.
Instructions
Scan a single ML model file for supply-chain risks: dangerous Python globals reachable during pickle deserialization (os/subprocess/eval/socket/dill gadgets, inside PyTorch zip checkpoints, joblib dumps and NumPy object arrays too), a malformed or disguised .safetensors header, a Keras Lambda-layer RCE pattern in .h5/.keras files, a path-traversal external_data reference in .onnx files, malformed GGUF headers and chat templates that escape the Jinja sandbox or carry hidden instructions, and TensorFlow SavedModel/GraphDef/TFLite graphs that read or write files or call Python.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to the model file (.pt, .pth, .ckpt, .pkl, .pickle, .bin, .dill, .joblib, .jbl, .npy, .npz, .safetensors, .h5, .hdf5, .keras, .onnx, .gguf, .pb, .pbtxt, .tflite) |