85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
Glossary

What is source-sink analysis for AI agents?

Source-sink analysis, applied to AI agents, maps the sources through which untrusted content can influence an agent and the sinks, such as sending data or following links, that become dangerous if the agent is misled.

Source-sink analysis is an established security engineering technique: track where untrusted data enters a program (the source) and where it could cause harm (the sink), then check every path between them. Static analysis tools call the tracking part taint tracking, which follows untrusted data even as it is transformed.

OpenAI applied the idea to agents in its March 2026 post on designing agents to resist prompt injection. The post treats prompt injection as social engineering aimed at the model and, for ChatGPT, combines that view with source-sink analysis. In OpenAI's usage, a sink is a capability that becomes hazardous once the model has been misled, such as sending information to a third party, following a link or using a tool.

Sources and sinks in an agent

  • Sources

    Web pages, emails, shared documents, support tickets, file contents, tool and MCP server outputs, and messages from other agents: anything the agent reads that a third party could have written.

  • Sinks

    Sending email or messages, HTTP requests and link fetches (a URL can carry data out in its query string), writes to shared systems, payments and code execution.

  • Paths

    The route from a source to a sink through the agent's context. Because a model reads everything in one context, any source can influence any sink unless the design separates them.

Why it beats input filtering alone

Classifiers that scan inputs for injected instructions catch known patterns and miss new ones. OpenAI's position is that a successful manipulation should still have limited impact, which means removing or guarding paths rather than relying on detection.

OpenAI describes one sink-side mitigation in ChatGPT, called Safe Url, which detects when the assistant is about to send information from the conversation to a third party. The defence sits at the sink, where it works whichever source the attack came from.

Related framings

  • Lethal trifecta

    Simon Willison (June 2025): an agent with private data, exposure to untrusted content and a way to communicate externally is at serious risk. Remove one leg.

  • Agents Rule of Two

    Meta (October 2025): within one session, an agent should have at most two of three properties: processing untrustworthy input, accessing sensitive systems or private data, and changing state or communicating externally. If it needs all three, it needs supervision or the task should be split across sessions.

  • CaMeL

    Google DeepMind's 2025 design tracks data flow and capabilities in a custom interpreter, so the source-sink check is enforced by code at every tool call. See the dual LLM pattern.

Doing the analysis

  • List the sources

    Every input path, including tool results and retrieved documents, not only the user's message.

  • List the sinks

    Every tool that sends, writes, pays, executes or fetches.

  • Draw the paths

    For each sink, which sources can influence its arguments within the same context.

  • Cut or guard each path

    Split reading and acting into separate sessions, allowlist destinations, require approval, or remove the sink from that agent altogether.

How Motiontic's engineers apply it

Motiontic's engineers put a source-sink map in the design document of every agent that reads outside content, and review it with the client's security team. Each path from an untrusted source to a high-impact sink is either removed, by splitting reading and acting into separate steps, or guarded by an allowlist or an approval, and injection tests target every path that remains.

Three framings of the same problem

Three framings of the same problem
Source-sink analysisLethal trifectaAgents Rule of Two
FromSecurity engineering, applied to agents by OpenAI (2026)Simon Willison (2025)Meta (2025)
Unit of analysisPaths from sources to sinksThree capabilities in one agentThree properties in one session
RuleLimit what a successful manipulation can reachRemove one of the threeHold at most two, or add supervision
GranularityPer path and per sinkPer agentPer session

Common questions

What are sources and sinks in prompt injection?

A source is any way untrusted content can reach the agent, such as a web page, email or tool output. A sink is a capability that does harm if the agent is misled, such as sending data out, following a link or calling a tool.

How is source-sink analysis different from the lethal trifecta?

The lethal trifecta judges an agent as a whole by three capabilities. Source-sink analysis works path by path, which lets a design keep a risky capability while guarding the specific routes an attack could take to it.

Does source-sink analysis prevent prompt injection?

No. It assumes some injections will succeed and limits what they can reach. OpenAI and the other labs describe prompt injection as reduced, not solved.

What is taint tracking?

Taint tracking extends data flow analysis to follow untrusted data even when its value changes, so anything derived from a tainted input is treated as tainted too. CaMeL applies a similar idea to agent tool calls.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.