F8 · Floor 8 · Model Foundry
AI Supply Chain: The Gift Model
The free model was a gift. So was the shell on our GPU server. In this lesson you investigate the incident, reproduce the attack yourself, then fix it.
AI Supply Chain in brief
The AI supply chain is every model, adapter, dataset, package and plugin you didn't build yourself. Each one can carry a vulnerability or a backdoor, and model files in pickle-based formats can run code just by being loaded.
What you'll learn
- Load models in safe formats like safetensors, and never unpickle files from untrusted sources outside a sandbox.
- Pin models and packages to exact versions and hashes, verify publishers and signatures, and never deploy "latest".
- Pull dependencies through a vetted internal mirror, so typosquats never reach your build.
- Keep an AI bill of materials: which models, datasets and adapters run where, and where they came from.
- Self-reported benchmarks and download counts are marketing, not evidence.
Why it matters
Security researchers have found models on public hubs carrying pickle payloads that open reverse shells when loaded, and attackers regularly publish typosquatted packages on PyPI and npm targeting ML libraries. Hubs now scan uploads and promote safetensors, but scanners can be evaded, so the loading side has to be safe too.
Securing the ML supply chain end to end
Treat third-party models like third-party code. Choose publishers deliberately, check the organisation (not just the name), pin to a commit hash, verify checksums or signatures, and mirror approved artefacts internally so builds never reach out to the public hub directly.
Load in safe formats, and convert pickles in a sandbox once if you must use them. Run training and evaluation jobs with least-privilege credentials and restricted network egress, so a malicious artefact can't reach your cloud keys or phone home.
An AI-BOM (models, datasets, adapters, packages, licences, where each runs) lets you respond to advisories in minutes, and it's increasingly expected by regulators and customers.