model_scanner__scan_hf_repo
Scans every model file in a Hugging Face repo at a pinned commit to inspect headers and pickle streams for security risks; supports gated repos via HF_TOKEN.
Instructions
Scan every model file in a Hugging Face model repo at a pinned commit. The revision (branch, tag or commit sha, default main) is resolved to a commit sha and all files are read from it. Files over 256 MB are checked from their first 64 MB (and last 64 MB for zip containers), which hold the headers and pickle streams the checks read. Gated or private repos need HF_TOKEN in the server's environment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Model repo id, e.g. "openai-community/gpt2" | |
| maxFiles | No | Maximum number of model files to fetch and scan (default: 200) | |
| revision | No | Branch, tag or commit sha (default: main) |