Skip to content
ai-supply.store
탐색카테고리리더보드커뮤니티Agent APIFAQ
로그인무료 가입
catalog / Cybersecurity / ModelScan — ML Model Serialization Scanner
⛨GuardrailCybersecurityFree

ModelScan — ML Model Serialization Scanner

ProtectAI's scanner that detects malicious payloads hidden inside pickle, PyTorch, TF, and Keras model files.

@ai-supply
설치 수19k
⟳ upstream v0.8.8 · updated 5mo ago
↗ 소스 저장소
← More CybersecurityCybersecurity leaderboard →How we grade security →Source ↗
! Grade B · 88/100 · ReviewSecurity assessment
✓No compromise signals14capabilities surfaced1known CVE7of 20 OWASP controls clear
Broad capability surfaceBroad capability surfaceVulnerable dependenciesExternal endpoints declared · expected
scanned 18d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

ModelScan — ML Model Serialization Scanner

ModelScan, maintained by ProtectAI, scans ML model files for serialization attacks — one of the most underappreciated supply-chain risks in AI. A malicious .pkl, .pt, or .h5 file can execute arbitrary code on torch.load(). ModelScan flags these before they reach production.

Key features

  • Supports pickle, PyTorch (.pt/.pth), TensorFlow SavedModel, Keras .h5, NumPy, and more
  • CI/CD ready: exit code 1 on findings, JSON/text output
  • Zero false-positive safe-model passes (no benign ops blocked)
  • GitHub Action available
  • Integrates with Hugging Face Hub via the huggingface-hub audit CLI

Quick start

pip install modelscan
modelscan scan -p ./my_model.pkl
# Scan an HF model directly
modelscan scan --huggingface bert-base-uncased
npx ai-supply add modelscan-serialization-security

Curated mirror of the open-source ModelScan (Apache-2.0). Get it from the source.

Rating rank
#1
of 19 in Cybersecurity
Install rank
#16
of 19 in Cybersecurity
Security score
88/100 · B
review
Security rank
#6
of 19 in Cybersecurity
Installs
19k
cat avg 85k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Cybersecurity leaderboard →
! Security: Review · 8888/100 · grade Bscanned 18d ago
✓ no compromise signals15 risk-surface · 7/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

Control card · high confidence (static)
framework: pytestcovers: secrets-leakcovers: prompt-injectioncovers: robustness
scanscannedchecksScanResultsScanBasescan_pickle_bytesscan_numpyscan_pytorchEvaltest_scan_pickle_bytestest_scan_ziptest_scan_pytorchtest_scan_numpytest_scan_file_pathtest_scan_pickle_operatorstest_scan_directory_pathtest_scan_kerastest_scan_tensorflowtest_maintest_main_defaultgroup

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM01Prompt Injectionhigh
Adversarial instructions embedded in an artifact that hijack a downstream LLM.
•Prompt-injection phrasing — instruction-subversion language detected · protectai-modelscan-61fcec9/CONTRIBUTING.md (CWE-77)expected
⚠LLM03Supply Chainhigh
Vulnerable/compromised dependencies, models or archives in the artifact.
•Vulnerable dependencies — 96 known vulnerabilities in: aiohttp@3.12.13, black@25.1.0, filelock@3.15.4, idna@3.7, keras@3.11.3, markdown@3.6, pillow@11.3.0, protobuf@6.32.0 (CWE-1395)known CVE · -12 pts
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — OS command execution; dynamic os import · protectai-modelscan-61fcec9/modelscan/settings.py (CWE-78)expected
•Suspicious code patterns — pickle deserialization · protectai-modelscan-61fcec9/modelscan/tools/picklescanner.py (CWE-502)expected
•Suspicious code patterns — OS command execution · protectai-modelscan-61fcec9/notebooks/README.md (CWE-78)expected
•Suspicious code patterns — dynamic code execution; dynamic os import; pickle deserialization · protectai-modelscan-61fcec9/tests/test_modelscan.py (CWE-95)expected
⚠LLM06Excessive Agencymedium
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · protectai-modelscan-61fcec9/.pre-commit-config.yamlexpected
•External endpoints declared — 2 distinct host(s) · protectai-modelscan-61fcec9/CONTRIBUTING.mdexpected
•External endpoints declared — 9 distinct host(s) · protectai-modelscan-61fcec9/README.mdexpected
•External endpoints declared — 11 distinct host(s) · protectai-modelscan-61fcec9/docs/model_serialization_attacks.mdexpected
•External endpoints declared — 6 distinct host(s) · protectai-modelscan-61fcec9/modelscan/tools/picklescanner.pyexpected
•Broad capability surface — 3 high-impact capability categories referenced — verify least-privilege · protectai-modelscan-61fcec9/notebooks/README.md (CWE-272)risk surface
•External endpoints declared — 3 distinct host(s) · protectai-modelscan-61fcec9/notebooks/README.mdexpected
•Broad capability surface — 4 high-impact capability categories referenced — verify least-privilege · protectai-modelscan-61fcec9/tests/test_modelscan.py (CWE-272)risk surface
•External endpoints declared — 4 distinct host(s) · protectai-modelscan-61fcec9/tests/test_modelscan.pyexpected
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
◷LLM10Unbounded ConsumptionRuntime-enforced
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
✓LLM02Sensitive Information DisclosurePassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM07System Prompt LeakagePassed
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML02Data Poisoninghigh
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
•Prompt-injection phrasing — instruction-subversion language detected · protectai-modelscan-61fcec9/CONTRIBUTING.md (CWE-77)expected
⚠ML06AI Supply Chainhigh
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Vulnerable dependencies — 96 known vulnerabilities in: aiohttp@3.12.13, black@25.1.0, filelock@3.15.4, idna@3.7, keras@3.11.3, markdown@3.6, pillow@11.3.0, protobuf@6.32.0 (CWE-1395)known CVE · -12 pts
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — OS command execution; dynamic os import · protectai-modelscan-61fcec9/modelscan/settings.py (CWE-78)expected
•Suspicious code patterns — pickle deserialization · protectai-modelscan-61fcec9/modelscan/tools/picklescanner.py (CWE-502)expected
•Suspicious code patterns — OS command execution · protectai-modelscan-61fcec9/notebooks/README.md (CWE-78)expected
•Suspicious code patterns — dynamic code execution; dynamic os import; pickle deserialization · protectai-modelscan-61fcec9/tests/test_modelscan.py (CWE-95)expected
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (2) · hygiene / uncategorized
•Unrecognized file type — '.gitignore' is not on the allowlist · protectai-modelscan-61fcec9/.gitignorerisk surface
•Unrecognized file type — '.?' is not on the allowlist · protectai-modelscan-61fcec9/LICENSErisk surface
✔ verified source · pinned protectai-modelscan-61fcec9
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/modelscan-serialization-security/check). Click a policy:

Consume ModelScan — ML Model Serialization Scanner programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/modelscan-serialization-security

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/modelscan-serialization-security/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add modelscan-serialization-security

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/modelscan-serialization-security/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "modelscan-serialization-security" })
OpenAPI spec →
vlatest
! Security: Review · 881mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

무료로 제공하는 보안 검증 AI 역량 — skill, MCP, plugin, agent, 데이터셋을 비롯한 모든 항목에 보안 점수를 매기고 최신성을 추적하며, 사람과 agent 모두를 위해 만들었습니다.

api · v3.1status · all green
문의하기
support@ai-supply.storesecurity@ai-supply.store
카탈로그
  • 탐색
  • 카테고리
  • 리더보드
  • 벤치마크
  • 보안
  • Scan a repo
커뮤니티
  • 커뮤니티
  • FAQ
에이전트용
  • 빠른 시작 (60s)
  • 에이전트 승인
  • Agent API
  • OpenAPI 사양
빌더용
  • 게시
  • 대시보드
계정
  • 계정 만들기
  • 로그인
  • 설정
법적 정보
  • 이용약관
  • 게시자 계약
  • 이용 정책
  • 개인정보 처리방침