Finding AI Supply Chain Components
The AI supply chain includes every component that feeds into a production model: training datasets, base model weights, fine-tuned adapters, Python packages, and the pipelines that assemble them. Each is a potential attack surface. Mapping these components during reconnaissance identifies which supply chain attacks are feasible before the engagement moves into active exploitation.
Supply chain components to identify:
- Base model weights and fine-tuned adapters (Hugging Face, S3, internal registries)
- Training and evaluation datasets
- Python dependencies (LangChain, LlamaIndex, transformers, vector DB clients)
- Model provider API keys and Hugging Face tokens
- CI/CD pipelines that build, fine-tune, or deploy models
AI Supply Chain Reconnaissance on Hugging Face
Many organisations publish models on Hugging Face under their organisation name. Check for public model repositories, datasets, and spaces:
target-org/finance-llm-v1 4821 target-org/internal-embeddings 312
Public Hugging Face model repositories contain model cards that reveal training data sources, base models used for fine-tuning, and evaluation datasets. The model card is reconnaissance gold: it lists exactly what went into the model and where it came from.
Inspect Model Cards and Repository Metadata
Pull the full model card and repository file list for any identified models:
"base_model": "meta-llama/Llama-3.1-8B-Instruct", "datasets": ["target-org/finance-docs"], "tags": ["finance", "llama", "lora"]
README.md config.json adapter_config.json adapter_model.safetensors tokenizer.json
The presence of adapter_config.json and adapter_model.safetensors confirms the model is a LoRA fine-tune rather than a full fine-tune. LoRA adapters are smaller files that are easier to inspect and potentially replace. The base model listed in the card is the upstream dependency: a compromised base model affects all fine-tunes built on top of it.
Check for Exposed Model Storage
Model weights are large files often stored in cloud object storage. Misconfigured buckets sometimes expose these publicly:
Search for Leaked API Keys and Model Credentials
AI applications require API keys for model providers, Hugging Face tokens for model downloads, and sometimes credentials for vector databases. These frequently leak into public repositories:
A leaked Hugging Face token with write access allows publishing malicious model versions to the organisation's repository. A leaked OpenAI or Anthropic API key provides direct access to the production model without going through the application. A leaked Pinecone or Weaviate API key gives direct vector database access for RAG poisoning.
Audit Python Dependencies for AI Packages
If a requirements file is accessible, audit it for known vulnerable AI framework versions and suspicious packages:
Search GitHub for Internal AI Configuration
GitHub advanced search surfaces AI-related configuration files, environment files, and deployment scripts that reference internal AI infrastructure:
References
-
Hugging Face Hub: API documentationDOCS: Hugging Face Hub: API documentation, huggingface.co/docs/hub/api (opens in new tab)
Models, datasets, and spaces API reference for enumeration
-
trufflesecurity/trufflehog on GitHubREPO: trufflesecurity/trufflehog on GitHub, github.com/trufflesecurity/trufflehog (opens in new tab)
Secret scanning for GitHub organisations and repositories
-
pypa/pip-audit on GitHubREPO: pypa/pip-audit on GitHub, github.com/pypa/pip-audit (opens in new tab)
Python dependency vulnerability auditing