AI architecture · Security

Securing the AI model supply chain: signing, provenance and safe formats

Teams that wouldn't run an unsigned binary from the internet routinely download model weights from public hubs and load them into production. Models are software artefacts, with software supply chain risks and a few of their own.

ChecklistSumanta Mukhopadhyay8 min read7 sources
#security#ai#llm#governance
CHECKLIST · AI ARCHITECTURE · SECURITY24 Oct 2026 · 12:15 GST

Software teams have spent a decade learning to verify what they run: signed packages, pinned dependencies, software bills of materials, reproducible builds. AI teams often skip all of it. A model is downloaded from a public hub by name, loaded with a single line of code and deployed. If that file had been tampered with, or was malicious from the start, few organisations would notice.

As more companies run open-weight models privately, as in private LLMs on-prem, this becomes a real attack surface.

The risks

Code execution on load. Hugging Face's own documentation warns that pickle, the default format for PyTorch weights, can enable arbitrary code execution when a file is loaded, and recommends safetensors as a safer alternative1. Security researchers have reported malicious models on public hubs that used this to plant backdoors, and noted that pickle isn't the only risky format: some Keras models can run code through Lambda layers2.

Scanners are imperfect. A 2026 study of malicious pickle-based models reported that existing scanners varied widely in how well they detected them on its dataset, which is a reason not to treat a scan as proof of safety7.

Tampering and substitution. Without signatures, there's no reliable way to know a model file is the one its publisher released, or that the copy in your registry hasn't changed since it was approved.

Unknown lineage. Fine-tuned models inherit everything about their base model and training data, including licence terms and possible poisoning. Without records, you can't answer basic questions in a security review or due diligence.

The building blocks

ControlWhat it gives you
Safe formatsWeights that load as data rather than executable code, such as safetensors1
Model signingVerification that a model is unchanged and from the expected publisher. The OpenSSF model-signing project released v1.0 in April 2025, built on Sigstore and supporting any model format and size34
Build provenanceA record of how an artefact was produced. SLSA's build track defines levels from provenance existing (L1), to signed provenance from a hosted build platform (L2), to a hardened build platform (L3)5
ML bill of materialsAn inventory of the model, datasets and dependencies. CycloneDX supports ML-BOMs and model cards for transparency into security, privacy, safety and ethical considerations6

Treat a model like a container image: pulled from a trusted registry, pinned by digest, verified on deployment, and traceable to how it was built.

The checklist

  1. Use an internal model registry. Production never pulls directly from public hubs. Models are imported, reviewed and stored internally.
  2. Prefer safe formats. Accept safetensors or equivalent where possible; convert or reject formats that execute code on load. Load untrusted files only in isolated sandboxes.
  3. Scan on import, while remembering scanners miss things. Scanning reduces risk; it doesn't certify safety.
  4. Pin by hash, not by name. Reference models by immutable digest so "latest" can never silently change what runs.
  5. Sign what you produce and verify what you run. Sign fine-tuned and approved models at the end of your pipeline, and verify signatures at deployment.
  6. Generate provenance in your training pipeline, aiming for at least signed provenance from a managed build platform, in the spirit of SLSA Build L2.
  7. Keep an ML-BOM per model: base model, datasets, licences, training configuration and evaluation results, linked to your AI system register.
  8. Restrict runtime permissions. Model-serving containers need no outbound internet access and minimal privileges, enforced with the policies in Kubernetes admission policies.
  9. Re-evaluate after every model change with your evaluation set, including safety and behaviour tests, not just accuracy.

Beyond the weights

The supply chain extends past model files. Datasets, tokenisers, prompt templates, agent tools and MCP servers all shape behaviour. MCP servers in particular deserve the same allow-listing and review, as covered in securing MCP servers. Google's announcement of model signing noted plans to extend the approach to datasets and other ML artefacts4, which is the right direction.

Why this matters now

Enterprise customers and regulators are starting to ask where models come from and how they are controlled. An ML-BOM, signed models and a registry answer those questions concretely, and support governance frameworks such as those compared in ISO 42001 and the NIST AI RMF. They are also inexpensive to adopt early and painful to retrofit after an incident.

How I can help

I design secure AI platforms, from model registries and signing to provenance, runtime controls and evaluation, for organisations running private and open-weight models. See my AI architecture work, or analyse your challenge and bring the result to a call.

References
  1. 1
    Pickle scanningHugging Face documentation
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
FAQ

Common questions

Why are model files a security risk?

Some model formats can execute code when loaded. Hugging Face's documentation warns that loading pickle files, the default format for PyTorch weights, can enable arbitrary code execution, and recommends safetensors as a safer alternative.

What is model signing?

Cryptographically signing model files so consumers can verify they are unchanged and come from the expected publisher. The OpenSSF model-signing project released version 1.0 in April 2025, built on Sigstore, supporting any model format and size.

What is an ML bill of materials?

An inventory describing a machine learning model and its components, such as datasets, training details and dependencies. CycloneDX supports ML-BOMs and model cards for transparency into security, privacy, safety and ethical considerations.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.