Security that compounds

AUTHORS
PUBLISHED
Nov 18, 2026
DURATION
11 MIN
  • Security
TL;DR: Temporal’s security team gives AI agents a shared, versioned record of trust boundaries and past decisions, backed by source citations and tests, so each investigation builds on what the team already knows. Agents use that record to investigate reports and review designs, while deterministic controls enforce permissions and people approve consequential actions. Camper runs security campaigns as Temporal Workflows, preserving progress across restarts and long waits for review. Moving investigations themselves onto Temporal Workflows is the next step; today, those still run mostly as long-lived agent sessions.

When I joined Temporal, most of the security knowledge I needed was already written down, and written well; I just needed to find it. Design docs explained why a boundary sat where it did, past reviews recorded what had been decided, and the tickets, threads, and git history carried the rest. Some of the information had aged as the systems changed, and nothing brought it together in one current place. Each new report or design meant finding the pieces again and checking which ones still held.

Putting them back together has always been a slow process, often requiring a ton of context switching, and the volume just keeps growing. Agents help write more of our code now, and more of the code at the companies that run on Temporal. Often a researcher’s report comes in written with a model’s help, or a design shows up for review with an agent inside it. Or a dependency alert fires across dozens of our repositories at once, with more vulnerabilities to manage every month. The work always arrives sideways. We start by finding the boundary it touches and checking what we’ve already decided about it.

A lot of the work has to move earlier, into design and development, where the code is decided, and into the agents themselves. Some of it needs to be built to support agents and eliminate classes of risk with them.

Two tools came out of that. Deputy enforces supply-chain policy as code. Camper runs security campaigns as Temporal Workflows, because I was tired of carrying a campaign’s state in my head.

Tools only go so far, though. We don’t always get in early, and even when we do, someone has to remember what was decided and why, long after the meeting ends or an agent’s context fills up.

Start with what you know#

Earlier this year Andrej Karpathy described using LLMs to build a personal knowledge base, a wiki the model compiles from your sources and keeps current, and called the result a “persistent, compounding artifact.” I took that to heart, maybe too much.

We have such a knowledge base on the security team: ours is a collection of Markdown, Mermaid diagrams, and Go tests in a Git repository, describing how each part of Temporal is supposed to behave, with citations down to the source line and the design doc or thread where each decision was made. It also includes an ever-expanding taxonomy of projects and subjects. For each component it holds the trust boundaries and the control that guards each one, along with why it was built that way. Where we’ve tested a control, there are at least two tests, one showing it holds and one showing the bypass fails. Our open-source server, the SDKs, and Cloud are each written up on their own, because a claim that is true of one can be false of another.

The prose tells a model what the code alone doesn’t, such as why a boundary sits where it does. Every piece of work, by a person or an agent, ends by adding what it learned, down to the test it ran and who made the call, which is what makes it compound over time. An addition arrives as a pull request and is checked against current source and tests, and another agent, along with a person, reviews anything consequential. An agent’s claim that contradicts a written boundary starts an investigation, since the boundary itself may be what’s wrong. Agents also recheck written claims against the sources they cite and flag anything that has changed or no longer holds.

The agents on top#

Very often, one agent coordinates, routing each new item to triage: specialists each do one job, such as checking a claim against source code or reviewing a design against the written boundaries. An agent that has read one component’s trust boundaries answers questions about it well. Ask it to hold everything at once, and it struggles. So did I.

Importantly, the guidance doesn’t depend on one model or one harness. It travels with the record, as Markdown, skills, and rules, so anything that can read files can work from it, whether it’s a person using the record directly or an agent running in Claude Code, OpenAI Codex, or the Temporal Agent Harness. We can swap one out and keep the rest. Hooks, rules, and deterministic tooling handle enforcement and keep the agents on track. Git keeps every claim’s prior history, and changes go through review just like code.

The agents can still get things wrong. CI helps flag broken links to local test files, while reviewers, assisted by other agents, check whether the tests actually support the claims.

Where a check can be a rule, it is a rule#

Where a check can be written deterministically as code, we write it (often with an agent), and it runs whether or not the agent agrees. A hook masks recognizable credentials in the output of the tools an agent reads with, before the model sees them. Publishing a CVE takes a person’s signed approval for that exact record. In the repository that holds the record, the tooling won’t let an agent merge a pull request until a person approves that specific pull request, and we keep Camper’s auto-merge off for our campaigns, so maintainers review and merge every change today. Deputy exists to protect dependencies the same way, with one policy that can be enforced on a laptop, in CI, and at download time.

The model proposes, and code we control decides what it may do. A report can carry instructions meant to steer an agent, and the model may follow them. The controls outside the model limit what a steered agent can do, which is what lets me hand the agents more work while a person still signs off.

Each tool we work in gets a thin layer distilled from the record, and we’re working toward regularly distilling the same layer for the coding agents our engineers use, which puts security guidance in front of them while the code is being written. Tickets and design decisions stay in the tools teams already use, and the record ties them to the security claims and tests they support.

What arrives, and what it becomes#

A researcher’s report comes first. We own every report from the moment it arrives, and we treat every word of it as untrusted input. The agents lay the problem out, pulling what’s written about the boundary the report names, tracing the code path, drawing the sequence as a diagram, and restating the claim as questions a test can answer.

When the shape is unfamiliar, they build a proof of concept we can run against the open-source server and a Cloud staging environment. The reporter’s proof of concept tells us where to look, and the evidence we keep is a reproducer we wrote, because the hardest reports to triage are the confident ones that cite the right file and are still wrong. We hold our agents to the same standard; their conclusions become evidence when a test backs them. A person decides, and the disposition goes into the record with its test under their name.

A design review is where we get ahead of the code, because it doesn’t exist yet. We agree on requirements and recommendations with the team that owns the design, and the agents measure it against those and the boundaries already written for the components it touches. They turn up tangential issues along the way, which go to the owning team too, and what the review settles usually goes into the record before the feature ships.

A customer’s question is usually one the record already answers. The agents assemble what it says for the product the customer runs, a person writes the reply from that, and when it can’t answer, we have found a gap in the record and fill it. Dependency alerts arrive in bulk, and the agents check whether the vulnerable code is reachable from ours and prioritize the findings worth investigating for a person.

Think in patterns#

Once a pattern is written down, we can look for it everywhere else. We keep a heat map of the classes of problems that recur, and the goal is to retire a whole class with a design change. Some of that is design work with the owning teams. Other problems are small gaps repeated across dozens of repositories, such as a third-party action referenced by a tag that can move or a dependency adopted the hour it was published. We address those through campaigns, fixing the pattern everywhere at once before it comes back as another report.

Camper models each campaign as a Temporal Workflow, so it can wait a week for a review or pick up after a restart without anyone reconstructing what happened. Deputy makes the deterministic, policy-as-code changes; a coding agent (Claude Code or Codex) makes the ones that need repository context; and maintainers always decide what merges. Each pull request describes exactly what changed, and Camper picks up its half of the review, working through feedback alongside humans and AI agents. As of September 29, Camper had opened 394 pull requests across over a hundred of our repositories, and dozens of maintainers across the company had reviewed and merged most of them.

Deputy is open source, and we plan to open source Camper. Other teams have started running their own campaigns on Camper too, which is a story for another post.

From report to fix in under a day#

In September, a security firm reported a critical issue in s2s-proxy, our open-source server-to-server proxy. It asked connecting clients for a certificate, then accepted an untrusted, self-signed one. The report arrived one evening, and in under 24 hours the fix was merged and released, with the advisory, CVE-2026-96770, following about two hours later.

On our side, the speed came from work done before the report arrived. The boundary that listener was supposed to enforce was already written down, so deciding whether this was a vulnerability went quickly, and I reproduced the bypass with an agent before the fix shipped. A test filed with the record checks that the fixed configuration rejects that certificate. The maintainers wrote the fix and shipped it through their normal review, and my thanks go to the researchers who reported it. It was the whole thing working the way I’d hoped, and it was still a long night.

Moving investigations onto Temporal Workflows#

We’re not there yet. Camper runs on Temporal today, but the rest mostly runs as long-lived agent sessions, which are harder to reason about than they should be. A weeklong investigation includes failed steps and retries. It may pause for someone’s approval, and someone will eventually need to review its history. That is a Workflow, so in the design each agent step is an Activity, the unit of work Temporal retries and records. Once a model call completes and its result is recorded as the Activity’s result, replay uses that result instead of calling the model again. The Activity’s result is one record among several. The audit trail also includes details we deliberately record at each step, such as the source revision read and the approval given. That is what we’d read back when a customer or an auditor asks how we decided.

Most of this work is bursty, a report or a page and then nothing for hours, which is the shape Serverless Workers, in preview, are built for. Moving the investigation process itself onto Workflows is the part we haven’t built, and I’d rather say that plainly. Our customers are building agents on Temporal for the same reasons, and the record is where I’d tell any of them to start. Write down what you already know about how your systems should behave, and put it in front of the people and agents making the next change.

Temporal Cloud

Ready to see for yourself?

Sign up for Temporal Cloud today and get $150 in free credits.

Build invincible applications

It sounds like magic, we promise it's not.