protectai/modelscan
Protection against Model Serialization Attacks
What it solves
ModelScan prevents "Model Serialization Attacks," where malicious code is embedded into a machine learning model during the saving (serialization) process. These attacks can lead to credential theft, data theft, data poisoning, or model poisoning when a user loads the model using standard framework functions like torch.load().
How it works
Instead of loading the model—which would execute the malicious code—ModelScan reads the model file byte-by-byte as a string. It searches for unsafe code signatures without ever executing the file, making the process fast and secure. It then ranks detected issues by severity: Critical, High, Medium, or Low.
Who it’s for
Data scientists, ML engineers, and MLOps teams who download pre-trained models from the internet or share models across teams and environments, and who need to ensure these files are safe to load.
Highlights
- Multi-format support: Supports H5, Pickle, and SavedModel formats, protecting users of PyTorch, TensorFlow, Keras, Sklearn, and XGBoost.
- Static Analysis: Scans files without executing them, avoiding the risk of triggering the risk it is designed to prevent.
- Pipeline Integration: Can be used via CLI or Python API to be integrated into CI/CD and MLOps pipelines for scanning models before training, after training, and before deployment.
- Detailed Reporting: Provides results in console or JSON formats with severity rankings for identified vulnerabilities.
Related
- Project
- Project
- Project
- Project