βœ“
[MO]
tool open source

ModelScan

β˜… 1,650 GitHub Stars Release v0.8.4

Open-source ML model serialization scanner detecting unsafe deserialization and embedded code across PyTorch, Pickle, and Keras artifacts

// At a Glance
Category
Security Hardening
Platforms
linux, macos, windows
Pricing / License
Apache-2.0
Focus / Scope
2 MITRE Tactics

πŸ“‹ Tool Overview & Technical Brief

Verified Flagship

Overview & Engineering Philosophy

ModelScan by Protect AI is a specialized supply-chain security scanner built to inspect serialized machine learning model files before loading them into inference or training runtimes. Formats such as Python pickle, PyTorch .pt/.bin, TensorFlow SavedModel, and Keras .h5 frequently permit arbitrary code evaluation during deserialization, creating supply-chain risk when organizations pull community checkpoints.


Key Capabilities & Technical Highlights

  • Multi-Format Coverage: Inspects PyTorch, Pickle, TensorFlow SavedModel, Keras H5, and compressed model archives.
  • Zero-Execution Static Inspection: Analyzes bytecodes and unsafe operator imports (os.system, eval, posix.system) without actually loading or running the weights.
  • CI/CD & Registry Gates: Emits structured JSON exit codes ready for GitHub Actions, GitLab CI, and MLOps model promotion pipelines.
  • Custom Policy Exceptions: Configurable TOML settings letting teams pin audited modules while blocking unexpected deserialization sinks.

Defensive Architecture & Operational Deployment

When integrating ModelScan across enterprise environments, DevSecOps pipelines, or security auditing workflows, engineering teams should establish robust operational guardrails:

  • Principle of Least Privilege: Execute all assessment tasks using dedicated service accounts or ephemeral execution tokens configured with the minimum necessary read and write permissions.
  • Automated CI/CD Quality Gates: Pin tool versions and container digest hashes within continuous integration pipelines to prevent supply-chain drift and ensure reliable, deterministic compliance checks.
  • Centralized Telemetry & Log Ingestion: Stream structured scanner outputs, policy violations, and execution telemetry into unified SIEM dashboards and ticketing systems for rapid remediation tracking.
  • Strict Scope Boundary Validation: Enforce automated target verification filters to prevent accidental evaluation of third-party dependencies or external endpoints outside authorized audit scopes.

Practical CLI Usage Examples

modelscan -p ./models/candidate-checkpoint.pt
modelscan -p ./model-registry/ -r json -o modelscan-report.json

Operate strictly on repositories, networks, and environments where you hold explicit written authorization.

⚑ Installation & Quick Start

pip install modelscan
python3 -m venv venv-modelscan && source venv-modelscan/bin/activate && pip install modelscan
>_ Inspect via Terminal API (ToolWar v1)
curl -fsSL https://toolwar.com/api/v1/tools/modelscan/install
Official Publication / Xowia Technologies By Kapil Soni
Available on Amazon

The AI Hacker's Handbook

Finding, Exploiting and Reporting Vulnerabilities in LLM and AI Agents

Deep dive into adversarial prompt injection, jailbreaks, tool manipulation, insecure output handling, RAG poisoning, and agent hijacking methodologies. Master the modern offensive AI surface.

πŸ’¬ Discussion & Community Field Notes

0 comments
No reviews or comments yet. Be the first to share operational field notes!

Specification Matrix

Status
active
License / Model
Apache-2.0
Type
tool
Supported Platforms
linux macos windows docker
GitHub Telemetry
β˜… 1,650 145
Latest Release
v0.8.4
Maintenance
active
Featured in Collections
The AI Security Toolkit β†—
Community Rating
β˜… 4.7 (28)
Total Views
2,847
Last Verified
Nov 2026
Curated By
ToolWar Research Team

Maintainer Badge

Listed on ToolWar badge

Add this verified ToolWar badge to your repository README or project documentation.

Rate This Tool

Help fellow researchers evaluate tool effectiveness

Click a star to submit rating Registering rating... βœ“ Rating registered! Average: ( votes)