AI Supply Chain Security: Plant Canaries in the Outbound Path
Most AI supply chain security advice points one direction: inward. Scan the model file, pin the package, verify the signature. That half is real, and we have covered it in AI model security training. The half that gets l
Most AI supply chain security advice points one direction: inward. Scan the model file, pin the package, verify the signature. That half is real, and we have covered it in AI model security training. The half that gets less attention is outbound. Every prompt, retrieved document, tool-call argument and trace your AI feature produces is shipped to somebody else's infrastructure, and some of that somebody else's infrastructure is shipped to a fourth party you never signed with.
Two pieces this month put the outbound half on the front page of Hacker News: Dragos's AI Supply Chain Security: What Canary Tokens Found and Ars Technica's A leaky AI supply chain is exposing secret user data at an alarming rate. Read them for the incident detail. This post is about running the same kind of test against your own environment, because the vendor's breach notice is the slowest possible detection source.
Draw the Outbound Graph From Traffic, Not From the Vendor List
Procurement knows you pay for one LLM API. Your network knows about the tracing SaaS a developer wired in for debugging, the embedding endpoint a notebook calls, and the agent framework's telemetry. Start with what actually leaves.
If you run Zeek, the TLS SNI in ssl.log gives you a first cut without decrypting anything:
cat ssl.log | zeek-cut id.orig_h server_name \
| grep -E 'api\.openai\.com|api\.anthropic\.com|generativelanguage\.googleapis\.com|api\.mistral\.ai|api\.cohere\.com|openrouter\.ai|huggingface\.co|api\.smith\.langchain\.com' \
| sort | uniq -c | sort -rn
Count by source host, not by destination. The question is not "do we talk to OpenAI" but "which forty internal hosts talk to OpenAI, and which of those were never approved." Then do the same with your forward proxy logs to catch the hosts that egress through it. Anything in that list that is not a known model provider is probably an observability or evaluation vendor, and those are the ones holding full prompt and response bodies with retention policies nobody on the security team has read.
In OWASP's Top 10 for LLM Applications 2025, this sits at the seam between LLM02 (Sensitive Information Disclosure) and LLM03 (Supply Chain). In ATLAS terms, data pulled out through a vendor's systems lands under AML.T0025, Exfiltration via Cyber Means, and the model-side version is AML.T0057, LLM Data Leakage.
Plant the Canary Where the Data Goes
A canary token is a credential, URL or hostname with no legitimate use. Anyone who touches it is, by definition, someone who should not have. Thinkst's Canarytokens gives you several free types; two matter here:
-
AWS API key token: a real-looking
AKIA...key pair. When anyone calls an AWS API with it, you get an alert with source IP and user agent. Attackers who scrape stolen logs for credentials (T1552.001, Credentials In Files) try keys fast, which makes this the highest-signal placement. - DNS token: a unique hostname. Any resolver that looks it up fires an alert, which catches automated processing of the data (link unfurlers, crawlers, an LLM agent with a browsing tool) as well as humans.
Placement is the actual skill. Put the token in data that only reaches the third party you are testing:
- A synthetic support ticket that your AI triage feature summarizes. The key goes in the ticket body, formatted the way a careless customer would paste it.
- A document in the RAG corpus that is only reachable through retrieval, never rendered in the UI.
- A tool-call argument in a test agent run, so it lands in the agent framework's trace store.
Use one token per destination and per placement. If the RAG canary fires and the ticket canary does not, you have narrowed the leak to the vector store host or the retrieval path, not the model provider. A shared token tells you only that something, somewhere, leaked.
The Inbound Half Still Bites
Outbound is the neglected direction, not the only one. Two inbound patterns keep recurring:
Deserialization in the model-loading path. We sync NVD monthly for AI and LLM keywords into our CVE pages. Of the 667 entries in the current sync, 48 carry CWE-502, deserialization of untrusted data. CVE-2025-24357 (vLLM calling torch.load without weights_only=True) and CVE-2024-5998 (LangChain's FAISS.deserialize_from_bytes running pickle) are the same bug class in two layers of the stack. That is AML.T0010.001, AI Software, under AI Supply Chain Compromise.
Dependencies an assistant invented. Spracklen et al.'s package hallucination study (arXiv 2406.10279, USENIX Security 2025) tested 16 code-generating models and reported that 19.7% of recommended packages did not exist, with over 205,000 unique hallucinated names. Every one of those is a name an attacker can register. This is T1195.001, Compromise Software Dependencies and Development Tools, with a new delivery mechanism, and in ATLAS it maps to AML.T0011.001, Malicious Package. A cheap detection is to diff each CI run's resolved dependency set against the previous one and alert on any package name the organization has never installed before:
import json, pathlib
seen = set(json.loads(pathlib.Path("seen_packages.json").read_text()))
current = {line.split("==")[0].lower()
for line in pathlib.Path("requirements.lock").read_text().splitlines()
if "==" in line}
new = sorted(current - seen)
if new:
print("First-seen packages, review before merge:", new)
It is crude. It also catches the case the scanners miss: a package that is brand new, has no CVE, and has no reputation either way.
Where Canaries Fail
Canaries detect use, not access. An attacker who steals a vendor's prompt logs and never tries the key never trips anything. Careful operators also check keys before using them: aws sts get-access-key-info returns the owning account ID without touching that account, and the account IDs behind the public canarytokens.org service have been fingerprinted. If your adversary is that careful, run your own Canarytokens server with keys in an AWS account you control. And a canary that fires tells you a leak happened, not which subprocessor caused it, so expect a slow conversation with the vendor's security team.
None of this replaces contract review, data minimization in prompts, or zero-retention API settings where your provider offers them. It gives you a signal that does not depend on the vendor noticing first.
Mapping what leaves your network and building detections from Zeek data in a notebook is the kind of work we teach in Threat Hunting with Data Science, and the attack side of AI systems, including supply chain techniques mapped to MITRE ATLAS, is covered in AI Red Teaming.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.