L15. AI Supply Chain Security: Models, SBOMs & Dependencies
Course outlineLesson 15 of 21
AI systems inherit security vulnerabilities from their supply chains: pre-trained model weights, third-party datasets, ML framework libraries, and model registries. Each is a potential attack vector that traditional supply chain security practices do not fully address.
The AI Supply Chain
Every AI system in production rests on a supply chain of components it did not build:
- Pre-trained base models: downloaded from Hugging Face, a cloud provider registry, or a vendor
- Third-party training datasets: licensed data, web-scraped data, open-source datasets
- ML frameworks: PyTorch, TensorFlow, JAX, Hugging Face Transformers, LangChain, LlamaIndex
- Model serving infrastructure: vLLM, Triton, ONNX Runtime, vendor-managed serving
- MCP servers and plugins: third-party integrations connecting the model to the world
Any of these can be compromised or malicious, and the consequences propagate forward to every system built on top.
Model Provenance and Integrity
When you download a pre-trained model, how do you know it is what it claims to be? Risks:
- Typosquatting: a model named "llama-3-8b" that is actually a backdoored variant
- Compromised uploads: a legitimate model publisher whose account is compromised to distribute a malicious version
- Dependency confusion: a private model name that an attacker registers publicly with a higher version number
- Verify model checksums (SHA-256) against publisher-provided hashes before loading
- Use signed model artifacts where available (emerging capability in Hugging Face and cloud registries)
- Pin model versions explicitly; do not use "latest" tags in production
- Maintain an internal model registry: download approved models once, verify, and serve from the internal registry
- Scan model files with tools like ModelScan that detect serialization attacks in PyTorch pickle files
AI SBOM (Software Bill of Materials)
An AI SBOM extends traditional software SBOM to cover AI-specific components. A complete AI SBOM includes:
| Component Type | What to Record |
|---|---|
| Base model | Name, version, source URL, checksum, license, training data summary |
| Fine-tuning datasets | Name, version, source, license, preprocessing steps applied |
| ML frameworks | Name, version, checksum (same as software SBOM) |
| Serving infrastructure | Name, version, configuration |
| Third-party tools/plugins | Name, version, permissions granted |
Securing the Model Registry
The internal model registry is a high-value target: compromising it allows distributing malicious models to all systems that pull from it.
Controls:
- Require code review and security scan before merging new models into the registry
- Sign registry entries; clients verify signatures before loading
- Immutable artifact storage: once a model version is published, it cannot be overwritten
- Access control: separate read (for inference services) from write (for model deployment pipeline)
- Alert on unexpected new model versions or permission changes
- ✓AI supply chain components: pre-trained models, training datasets, ML frameworks, model serving infrastructure, and MCP servers/plugins
- ✓Model integrity: verify SHA-256 checksums against publisher hashes; pin versions; never use "latest" in production
- ✓ModelScan detects serialization attacks (PyTorch pickle exploits) in model files downloaded from external sources
- ✓AI SBOM covers base models, fine-tuning datasets, ML frameworks, serving infrastructure, and third-party tools with provenance details for each
- ✓Model registry: immutable artifact storage, signature verification on load, separate read/write permissions, alert on unexpected new versions
1. Why are PyTorch pickle files a specific supply chain risk that requires tools like ModelScan?
2. What does an internal model registry add beyond using a public registry like Hugging Face directly?
Recommended: Pluralsight
Pluralsight's AI security courses cover threat modeling, governance, and practical red teaming for AI systems to complement what you learn here.