How to Prevent the Use of Unsecured ML Models
Block unsecured ML models in JFrog Xray with an ML Model policy.
Use Case
A security team wants to protect the pipeline from unsecured machine learning (ML) models.
ML models can be a hidden source of security risk. This is especially true when they're serialized in formats like Pickle .pkl or sourced from unverified origins. These files can:
- Contain malicious code
- Leak sensitive data
- Behave unpredictably in production
To protect your pipeline, you can define security policies specifically for ML model package types. With these policies, you can:
- Block risky formats like Pickle or Dill.
- Allow only approved model versions.
- Automate responses like alerts, ticket creation, or blocking downloads.
Step 1: Create an ML Model Policy
Goal: Target the ML Model package type and define which models the policy matches.
- Create an ML Model Policy targeting the
ML Modelpackage type. - Set rules based on package name and version, for example
*.pkl.
Step 2: Choose Policy Actions
Goal: Decide how the policy responds when a model matches.
Apply actions such as:
- Block download or distribution
- Generate violations
- Trigger webhooks or notifications
Step 3: Attach the Policy to Watches
Goal: Apply the policy to the repositories you monitor.
Attach the policy to Watches in JFrog Xray that monitor your key repositories. Once active, JFrog Xray scans for risky or unapproved models and responds automatically.
This approach helps secure your ML supply chain from development through deployment. It closes gaps that traditional security tools often miss.
Related Topics
Updated 5 days ago
