Root0ne/gguf-radar
Security & PrivacyScans GGUF, Safetensors and PyTorch model files for hidden payloads and poisoned chat templates, and can rebuild a clean GGUF copy.
What it does
GGUF Radar inspects LLM model files without loading or executing the model or its chat template. GGUF files carry weights plus a chat template that formats conversations before inference; attackers have hidden programs after the weights and altered templates to instruct users or coding agents to run commands, as documented in the linked research post malicious GGUF models on Hugging Face. The tool gives each scan a verdict of CLEAN, SUSPICIOUS, MALICIOUS or ERROR, uses YARA rules for known supply-chain patterns gguf_supply_chain_threats.yar, and can write a clean GGUF that keeps the original weights.
It scans local files and Hugging Face-hosted models. For remote models it fetches only the small parts needed, so scans take seconds even for very large files. Safetensors and PyTorch models get chat-template checks.
Quick start
Requires Python 3.10 or newer.
pip install git+https://github.com/Root0ne/gguf-radar
gguf-radar scan ./model.gguf
gguf-radar scan Qwen/Qwen2.5-0.5B-Instruct-GGUF
gguf-radar sanitize suspicious.gguf -o clean.gguf
The first two commands print a verdict; sanitize writes a cleaned copy. Exit codes are 0 for CLEAN, 2 for SUSPICIOUS/MALICIOUS, and 1 for ERROR, so CI can fail on flagged files. Scan and sanitizing details are in scanning and sanitizing; the Python and CI usage is in ci-and-python.
Constraints
.gguf handling is the primary path; chat-template checks for Safetensors and PyTorch are narrower. SUSPICIOUS means a human still needs to review the file — the verdict is not a guarantee of safety. The model and template are not executed, but sanitize only rebuilds GGUF files and leaves the weights unchanged. Detection quality depends on the bundled YARA rules, and the documentation has a dedicated limitations page. Exit codes and the four verdicts are defined in the README's results table result meanings. Code is MIT-licensed; the logo, docs and YARA rules are CC BY 4.0 and require credit to the author license terms.
HotRepo's take
On 2026-11-28 the repository entered HotRepo's Python new-project list with 100 stars gained and 7 forks gained across a roughly 23-hour window starting 2026-11-27. That is a single early snapshot, not evidence of sustained growth, and it has no recorded GitHub all-language daily rank. The launch timing matches a concrete need: model scanning tools that avoid executing untrusted files give CI pipelines a way to gate downloads, and the project's scan-then-sanitize flow is a practical response to the template and post-weights attacks described in the linked write-up.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.