Skip to content

I.5I · The modeldefense

The model artifact & its supply chain

The AI supply chain is broader than software’s - data, weights, code, and infrastructure, most of it pulled from public hubs on implicit trust - so the load-bearing question becomes “is this the artifact the author actually built, unmodified?”

The four links in that chain:

LinkWhat it covers
DataPre-train, fine-tune, RAG (retrieval-augmented generation) corpora - see I.3
WeightsBase models, adapters, quantizations
CodeFrameworks, MLOps, connectors
InfrastructureServing, vector stores, GPUs

Most of it is pulled from public hubs with implicit trust.

Model files are code

A pickled checkpoint executes arbitrary code on load - downloading a model is running a stranger’s program (I.4 · Adversarial machine learning). Safer formats (safetensors) and scanners help - modelscan (Protect AI), fickling and picklescan flag unsafe pickle opcodes and embedded code before load - but unsafe deserialization remains a top hub risk, and weights themselves can be backdoored (Sleeper Agents, II.2 · Prompt injection & the LLM attack surface) which no format check detects. Because a model file can carry code, “is this the model the author actually built, unmodified?” becomes a load-bearing question - the provenance problem the software world solved for packages, now applied to weights and datasets.

Registry, dependency & MLOps risk

Scan & verify a model artifact before load (authorized testing only)
# 1) SCAN for unsafe deserialization / embedded code in weights
# modelscan (Protect AI) - flags os.system, exec, GLOBAL opcodes, etc.
pip install modelscan
modelscan -p ./<org>__<model>/pytorch_model.bin
modelscan -p ./<org>__<model>/ -r json -o modelscan-report.json
# fickling - decompile a pickle to inspect its opcodes / detect payloads
pip install fickling
fickling --check-safety ./<model>.pkl
fickling ./<model>.pkl # dump the pickled program to read it
# 2) PREFER safetensors; if a .bin/.pt ships instead, treat as suspicious
python -c "from safetensors.torch import load_file; load_file('model.safetensors')"
# 3) VERIFY provenance (OpenSSF Model Signing, Sigstore-backed)
pip install model-signing
model_signing verify sigstore \
--signature ./<model>/model.sig \
--identity <builder@org.com> \
--identity-provider https://accounts.google.com \
./<model>/
# Typosquat / dependency-confusion note: publishing a squat of huggingface_hub
# (e.g. huggingface-hubs) whose postinstall runs code, or a backdoored fork
# <org>/llama-3-8b-instruct-v2, is the same class - pin hashes, mirror internally.

Typosquatting and slopsquatting (LLMs hallucinate plausible package names attackers register) hit AI projects hard. MLOps infrastructure - experiment trackers, orchestrators, notebook servers - is often internet-exposed and under-hardened.

Infrastructure & deployment

Beneath the model: inference/serving endpoints, vector databases, container/Kubernetes orchestration, cloud configuration. Misconfigurations that look benign turn dangerous once AI workloads sit on them (exposed serving APIs, over-permissive IAM, unsecured vector stores). This is where most real-world breaches actually live, and it maps directly to the CSA advisory (VIII.5 · Jurisdictions - Singapore, the EU, the US & UK).

The findings that recur (your checklist)

Against a real MLOps estate, the same issues surface repeatedly:

  • Unsigned / unverifiable model artifacts - no OMS/Sigstore signature to verify against.
  • Unsafe-pickle weights loaded in CI - .bin/.pt deserialized with no modelscan gate.
  • Floating tags instead of pinned commit hashes - a moving supply-chain target.
  • Production pulls direct from public hubs - no internal, scanned mirror.
  • Exposed MLflow tracking server - remote unauthenticated file overwrite (CVE-2023-6018) & auth-bypass account creation (CVE-2023-6014) and deserialization RCE (CVE-2024-37052 and the related CVE-2024-37053 through CVE-2024-37060).
  • Exposed Ray dashboard - “ShadowRay” unauthenticated job-submission RCE (CVE-2023-48022), disputed by the vendor but actively exploited in the wild.
  • Kubeflow / Jupyter notebook servers without auth - unauthenticated code execution on the cluster.
Sweep the estate for exposed MLOps services (authorized testing only)
nuclei -tags mlflow,ray,kubeflow -u https://<target-host>

Integrity for the model artifact: signing, ML-BOM & provenance

That provenance question - “is this the model the author actually built, unmodified?” - is what the integrity tooling answers, and it matured quickly across 2025-2026:

  • Model signing - the OpenSSF Model Signing (OMS) specification (OpenSSF, introduced June 2025), building on the model-signing library/CLI that reached v1.0 in April 2025 (Google’s open-source security team with NVIDIA and HiddenLayer), built on Sigstore: keyless, identity-based signatures logged in a public transparency log (Rekor), with a detached bundle binding a model to its author and a manifest of file hashes. It is integrated into NVIDIA NGC and Google Kaggle.
  • Build & provenance levels - SLSA (“salsa”) gives a graded checklist for tamper-resistant build pipelines and verifiable provenance; Sigstore/Cosign supplies the signing and verification primitives.
  • Bill of materials - a ML-BOM (machine-learning bill of materials) enumerates the model, its datasets, and dependencies; CycloneDX (OWASP; v1.7, Oct 2025) has carried ML-BOM since v1.5, and OWASP’s SCVS guides component verification.
  • Documentation as metadata - Model Cards (Mitchell et al., 2019) record intended use, training data, and evaluation; the Coalition for Secure AI (CoSAI) is driving this toward tamper-proof, machine-readable metadata signed alongside the weights.