Skip to main content

04 AI Supply Chain

Supply chain security for AI systems: data, models, weights, code, dependencies, and infrastructure. This subcategory covers how the AI supply chain is structured, where trust boundaries fail, and how attacks propagate from an upstream artifact to a downstream deployment.

CAUTION

Educational content for authorized security testing only. Do not use the techniques described here against systems you do not own or have explicit permission to test.

Scope​

The AI supply chain spans four artifact classes:

  • Data - pretraining corpora, fine-tuning datasets, RLHF preference data, evaluation sets.
  • Models - base checkpoints, fine-tuned weights, adapters (LoRA, QLoRA), embedding models, tokenizers.
  • Code - training scripts, inference servers, quantization tools, deployment wrappers, agent frameworks.
  • Dependencies - Python packages, CUDA libraries, container base images, model hubs, package registries.

A failure in any one class propagates downstream. A poisoned dataset produces a backdoored model. A backdoored model is redistributed as a "fine-tune" and reaches production. A typosquatted package exfiltrates weights during training.

Files​

#File
01Supply Chain Fundamentals
02Model Provenance
03Dataset and Dependency Attacks
04Supply Chain Defense

Format​

All files use the two-track format (Offensive / Defensive), 11 sections:

  1. Overview
  2. Reconnaissance / Enumeration
  3. Common Attack Vectors
  4. Exploitation Recipes
  5. Post-Exploitation
  6. Preventive Controls
  7. Detection Controls
  8. Verification
  9. AI-Specific Considerations
  10. Production Notes
  11. References
  • AI - parent category
  • OWASP LLM Top 10 - LLM05 (Supply Chain Vulnerabilities)
  • RAG and Embeddings - embedding supply chain
  • Agents and MCP - tool and plugin supply chain

References​

Attack Surface Summary​

StageArtifactPrimary ThreatTrust Assumption
Data collectionRaw corpusPoisoning, provenance lossPublic data is honest
PreprocessingCleaned datasetTampering in transitPipeline is trusted
TrainingModel weightsBackdoor insertionCompute is isolated
Fine-tuningAdaptersMalicious base modelBase is benign
PackagingModel fileSerialization exploitFormat is safe
DistributionModel hubTyposquatting, account takeoverRegistry is honest
DeploymentInference serverDependency confusionPins are correct
ConsumptionApplicationPrompt injection via upstreamProvider is trusted

Design Principle​

The AI supply chain inherits every weakness of the traditional software supply chain and adds four new ones:

  1. Opaque artifacts - model weights are binary blobs. You cannot read them like source code. You need behavioral testing to detect a backdoor.
  2. Non-deterministic behavior - the same model can behave differently across runs. This makes anomaly detection harder.
  3. Data as code - a dataset is not just input, it shapes behavior. Poisoning a dataset is equivalent to injecting code.
  4. Continuous update - models are re-trained, re-fine-tuned, re-quantized constantly. Each version is a new attack opportunity.

Threat Model Template​

When assessing an AI supply chain, answer these questions:

  • Where do the weights come from? Public hub, vendor, or trained in-house?
  • Is the training data documented? Can you trace every sample to a source?
  • Are dependencies pinned to immutable versions (hashes, not tags)?
  • Is the model file format safe to load (safetensors vs pickle)?
  • Who can push a new version to the registry? Is that action logged and reviewed?
  • Can you detect a behavioral change between model versions?
  • What is the blast radius if the inference server is compromised?