A teammate wants to load a model file they downloaded from a public hub. What supply chain risks do you check?
AI security · Pro 1
Short answer
Some model formats, especially Python pickle files such as many .pt, .pkl and .bin files, can run code when loaded, so a malicious file can take over the machine. I would prefer safetensors, which holds only weights, check the publisher and scans, pin the version, sandbox untrusted files, and record the model in our AI inventory.
Deeper answer
Pickle rebuilds Python objects and can call functions while loading, so opening the file is enough to run an attacker's code. Hub platforms scan uploads, but scanning is not a guarantee. Safer options: safetensors for weights, and in PyTorch loading with weights_only=True where possible.
The wider AI supply chain also includes the training data, tokenizers, custom code that some models ask you to trust (for example trust_remote_code), Python packages, and the base model behind a fine-tune. Controls: an approved list of sources and publishers, pinned commit hashes, a private mirror for approved models, dependency scanning, model cards reviewed for licence and known limits, and an AI bill of materials so you know what you run when a new issue is announced.
What a strong answer covers
- Pickle can execute code on load
- Prefers safetensors or weights-only loading
- Checks publisher, scan results and pins versions
- Sandboxes untrusted files
- Wider supply chain: data, code, packages, AI-BOM
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- Why is pinning a commit hash better than using the latest version?
- What does trust_remote_code do, and when would you allow it?
Common mistakes
- Assuming model files are just data and safe to open
- Pulling the latest version of a model in production without pinning
Learn it
- Attackers now use LLMs to write phishing emails. What changes for defenders, and what still works?
- What is attack success rate in AI red teaming, and what are its limits as a metric?
- Threat model an LLM chatbot for a retail bank that can answer questions and show a customer's recent transactions.
- What is the CIA triad, and how would you use it to judge a security problem?
- What is data poisoning, and how would you protect a model you train or fine-tune from it?
- As a security engineer, how would you protect a company's finance team from deepfake voice or video calls from the 'CEO'?
- You find code that builds a SQL query by joining strings with user input. What is the risk and how do you fix it?
- What is the difference between hashing and encryption, and which do you use for passwords?
- An employee's laptop shows signs of malware at 11 pm. Walk me through your incident response.
- Explain least privilege. How would you apply it to a new team's cloud and app access?
- Your SOC wants an LLM copilot to summarise alerts and suggest actions. What are the risks and how do you manage them?
- What is tool poisoning in MCP or agent tools, and how do you defend an agent against it?
- What is MITRE ATT&CK, and how does a detection team actually use it?
- A vendor says their ML intrusion detector is 99% accurate. Why might it still drown your SOC in false alarms?
- What is a model extraction attack, and how would you defend a model you serve through an API?
- Walk me through the OWASP Top 10 for LLM applications. Which risks would you check first in a RAG chatbot?
- How would you defend a company against phishing? Where do SPF, DKIM and DMARC fit in?
- You are asked to red-team your company's customer support chatbot before launch. How do you go about it?
- Tell me about a security incident or near miss you handled. What did you do and what changed afterwards?
- Staff are pasting company data into public AI tools without approval. How would you handle shadow AI?
- Your SOC gets thousands of SIEM alerts a day and analysts are ignoring them. How do you fix alert fatigue?