Skip to content

Security — Local vs Cloud, Supply Chain, SafeTensors

Local is private by default, not automatically secure. Inference stays on your machine, but three other data flows leak: tool telemetry, malicious model files, and network exposure.

Local is private by default, not automatically secure. Inference stays on your machine, but three other data flows leak: tool telemetry, malicious model files, and network exposure.

Verified concrete controls (12-point checklist, Aug 2026):

Risk Control
Untrusted model files (supply chain) Download only from Hugging Face or the official Ollama library; verify SHA-256 before loading sensitive workloads
API network exposure Ollama binds to localhost by default — never set OLLAMA_HOST=0.0.0.0; bind all endpoints to 127.0.0.1
Telemetry LM Studio: Settings → Privacy → uncheck "Send anonymous usage data"; GPT4All: disable analytics. Ollama and Jan collect nothing by default (auditable source)
Prompt/log confidentiality Full-disk encryption (macOS FileVault / Linux LUKS); store chat logs in an encrypted folder or disable logging
Lateral risk Dedicated user account for LLM work; audit all extensions/plugins; block outbound from the model process with pf (macOS) or ufw/OpenSnitch (Linux)
Regulated data Air-gap the machine; document approved model versions for audit

Model supply-chain threat model (2026 state of the art): - Pickle deserialization remains the default in many PyTorch checkpoints and is functionally arbitrary code execution at load time. SafeTensors eliminates this vector entirely — refuse non-SafeTensors loads or sandbox pickle loads with no network/filesystem access. - trust_remote_code=True executes tokenizer/config code — disable by default, allowlist only verified publishers. - Weight-level backdoors (BadNets/TrojDiff style) are the hard, active research frontier: detection via Sigstore-style signed artifacts/weight hashes (Meta, Mistral, Alibaba, Anthropic participate for open-weight releases), adversarial behavioural corpora, and weight-statistics tools (ModelScan, NeuralCleanse) — with real false-positive problems. - Dataset poisoning is the least mature corner; CycloneDX 1.6 added AI/ML dataset components for SBOM-style provenance. - Scale of the problem: the Hugging Face Hub took down nine separately reported malicious model uploads in Q1 2026, at least three already pulled into production pipelines. MITRE ATLAS is the de facto tactical reference. - Privacy vs delegated security: cloud providers handle infrastructure security but your prompts transit their servers and are subject to legal process; local gives privacy autonomy at the cost of manual hardening. Local also removes the Art. 28 GDPR processor obligation for the model vendor.

Sources

Date: 2026-10-09