Vet a Hugging Face model before you trust it.
Malicious PyTorch checkpoints have repeatedly bypassed picklescan
(Hugging Face's own scanning dependency) via documented, CVE-tracked techniques —
CVE-2025-1889, CVE-2025-10155, CVE-2026-53875, and more.
Hugging Face's website shows scan-result badges, but huggingface_hub's
hf_hub_download() / snapshot_download() have no API to check
"was this scanned, and did it pass" from a script. A developer or agent downloading a
model programmatically never sees that signal at all. modelvet closes that
gap: it re-scans what you actually downloaded, and checks for a
Sigstore / OpenSSF Model Signing signature (real, working, but essentially unadopted
on Hugging Face today).
Not on PyPI yet — install straight from the source repo:
pip install git+https://github.com/sangmorg1-debug/modelvet.git
modelvet scan bert-base-uncased
modelvet scan bert-base-uncased --format json
modelvet scan local-check --local-dir ./downloaded-model
modelvet scan hf-internal-testing/tiny-random-gpt2
against an actual public model, shown as-is. Install the CLI locally to scan a real repo
of your own.
signature: no_signature — expected; this repo, like almost every repo on Hugging Face today, has never published one.
exit code: 0
transformers.from_pretrained() wrapper — CLI only in v1.picklescan (an actively maintained, if imperfect, tool), with two narrowly-scoped checks added for its documented bypasses (archive-format mismatch, hidden pickles under non-pickle extensions).--local-dir today, not a bare Hub repo id — Hugging Face's cache layout gives no place to put a signature file for a model you didn't download and sign yourself.