pickle
AI security interview questions tagged pickle, across every topic.
3 questions · 1 unlocked for you
Concepts behind "pickle"
Explanations of the mechanisms these questions rely on.
Foundational
Unsafe Model Files: Pickle versus SafetensorsMany machine-learning checkpoints have been saved with Python's pickle, a format whose loader can execute code chosen by the file's author, so loading an untrusted model can compromise the machine. Safetensors stores only tensors and a small JSON header, so loading cannot run code. It fixes that one problem: it does not detect backdoored weights, malicious custom code shipped alongside a model, or poisoned training. A safe model intake process combines safe formats, restricted loaders, scanning, provenance and isolation. Supply Chain Security
Core
Insecure DeserializationDeserialization turns bytes back into objects. Formats that can describe arbitrary objects, such as Python pickle, Java native serialization and unsafe YAML loaders, can be made to call functions during loading, so untrusted input becomes code execution. The fix is to never deserialize untrusted data with such formats: use data-only formats like JSON, safe loaders, schemas, and for machine learning, safetensors instead of pickle-based checkpoints. Signing proves origin, not safety. Application SecuritySign in