# AI Supply Chain Security: Plant Canaries in the Outbound Path

By Charles Givre · 2026-11-23

> Your AI supply chain runs two ways: code and models come in, prompts and logs go out. How to map the outbound path and catch leaks with canary tokens.

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](/blog/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](https://www.dragos.com/blog/ai-supply-chain-security-canary-tokens) and Ars Technica's [A leaky AI supply chain is exposing secret user data at an alarming rate](https://arstechnica.com/security/2026/11/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](https://docs.zeek.org/), the TLS SNI in `ssl.log` gives you a first cut without decrypting anything:

```bash
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](https://genai.owasp.org/llm-top-10/), 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](/atlas/AML.T0025), Exfiltration via Cyber Means, and the model-side version is [AML.T0057](/atlas/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](https://docs.canarytokens.org/) 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](/mitre/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:

1. 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.
2. A document in the RAG corpus that is only reachable through retrieval, never rendered in the UI.
3. 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](/cve/). Of the 667 entries in the current sync, 48 carry CWE-502, deserialization of untrusted data. [CVE-2025-24357](/cve/CVE-2025-24357) (vLLM calling `torch.load` without `weights_only=True`) and [CVE-2024-5998](/cve/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](/atlas/AML.T0010.001), AI Software, under AI Supply Chain Compromise.

**Dependencies an assistant invented.** Spracklen et al.'s package hallucination study ([arXiv 2406.10279](https://arxiv.org/abs/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](/mitre/T1195.001), Compromise Software Dependencies and Development Tools, with a new delivery mechanism, and in ATLAS it maps to [AML.T0011.001](/atlas/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:

```python
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](/courses/threat-hunting-data-science), and the attack side of AI systems, including supply chain techniques mapped to MITRE ATLAS, is covered in [AI Red Teaming](/courses/ai-red-teaming).

## FAQ

### What is the AI supply chain?

Every third party that touches an AI feature, in both directions. Inbound: model weights, Python packages, agent tools and container images you pull in. Outbound: the model API provider, the tracing or eval service that stores every prompt, the vector database host, and any plugin vendor that receives tool-call arguments. MITRE ATLAS covers the inbound half as AML.T0010, AI Supply Chain Compromise. The outbound half usually has no owner.

### How do canary tokens detect AI supply chain leaks?

You place a credential or URL that has no legitimate use inside data you know flows to an AI vendor, such as a support ticket that gets summarized or a document in a RAG corpus. If that data is later stolen from the vendor, a subprocessor, or a log store and someone tries the credential, the token alerts with the source IP and timestamp. It proves exposure after the fact. It does not prevent anything.

### What is package hallucination or slopsquatting?

A code assistant suggests a dependency that does not exist, and an attacker registers that name on PyPI or npm with a malicious payload. Spracklen et al. measured hallucinated package names across 16 code-generating models in a USENIX Security 2025 paper. The defense is boring: install only from a reviewed lockfile or an internal mirror, and treat any first-seen package name as a review event.


---

Canonical: https://gtkcyber.com/blog/ai-supply-chain-canary-tokens/