ZeroDrift AI audit architecture

How ZeroDrift works.

ZeroDrift uses Sessions, Workflows, and the Runner to control execution, then divides the attack surface into Investigation Units for specialist Agents. Candidate issues must pass source-evidence validation, deduplication, triage, and review before they become final results.

Session-scopedInvestigation UnitsSpecialist AgentsEvidence-gated

Overall architecture

How execution control and security research work together

The Agent Runtime maps the attack surface, traces call paths, forms vulnerability hypotheses, and collects evidence. Session, Workflow, Runner, and BaseAgent manage the Stage DAG, threads, runtime state, and Artifacts. Research moves through the same Session before entering the Finding Pipeline.

Orchestration control chain

Session → Workflow → Stage / Turn → Runner → BaseAgent → Finding Review

The Workflow defines the research strategy and Stage DAG. The Runner restores the Session, schedules Agents, manages threads, and keeps the source snapshot, Attack Surface Map, Artifacts, and Findings attached to the same audit.

CONTEXT

Audit Session

Source, scope, threads, Artifacts, and state

MAP

Attack Surface Map

Entry points, assets, and sensitive paths

FOCUS

Investigation Units

Target × risk angle × evidence needs

RESEARCH

Agent Runtime

Attack surface, call paths, hypotheses, and evidence

VERIFY

Finding Pipeline

Convergence, deduplication, triage, and review

Execution backbone

Session · Stage · Turn · dependsOn

Investigation model

Attack Surface Map · Per-unit analysis · Global synthesis

Evidence loop

Source evidence · Deduplication · Triage · Review

How AI finds issues

A five-stage audit pipeline

The process locks the target, maps the attack surface, creates Investigation Units, and assigns them to specialist Agents. Every result then converges into a reviewed Finding.

01

Session setup

Lock the target, scope, and execution state.

An Audit Session is the single source of truth for one audit. It binds the source snapshot, Workflow, Agent configuration, and runtime state so every conclusion traces back to the same target code.

Pin the repository version, dependencies, and audit scope
Keep Workflow, Agent, and runtime configuration together
Persist thread, Artifact, and Finding state throughout the run
Output: Traceable Audit Session
02

Attack surface decomposition

Map the attack surface, then turn it into focused questions.

The entry Stage inventories external entry points, critical assets, trust boundaries, and sensitive paths. It then combines a target, risk angle, and evidence requirements into Investigation Units that can be analyzed independently.

Model reusable investigation steps as Stages and Turns
Create each Investigation Unit from its target, impact, and evidence needs
Store the upstream Attack Surface Map as a structured Artifact
Output: Attack Surface Map and Investigation Units
03

Specialist Agent orchestration

Give each Investigation Unit a dedicated run.

The Runner schedules specialist Stages through the Workflow DAG. Investigation Stages work one unit at a time, while synthesis Stages can compare the full result set. BaseAgent keeps the same Workflow portable across model providers.

Choose Codex, Claude-compatible, or Gemini Agents by task
Inject the Skills and MCP tools assigned to each Stage
Manage model-native threads with new, resume, or fork
Output: Specialist analysis and candidate evidence
04

Candidate consolidation

Converge distributed analysis into candidate Findings.

After Agents submit their analysis, the system extracts candidate issues, attaches source evidence, and confirms that every referenced path resolves accurately in the target repository.

Aggregate candidate issues from different Agents
Preserve the issue description, real impact, and exploit conditions
Require every source reference to resolve to the original code
Output: Candidate Findings with source evidence
05

Review and enrichment

Deduplicate, triage, and verify before acceptance.

Each Finding enters a dedicated follow-up flow. Duplicate candidates are consolidated, severity is assessed against project rules, and review Stages can apply independent reasoning, local tests, on-chain confirmation, or PoC validation.

Consolidate candidates that share the same root cause
Set severity from real impact and exploitability
Attach validation output, a PoC, or report Artifacts
Output: Confirmed Finding

Context and memory

The Runner assembles Agent context for each Stage

The Runner builds the current Stage context from the repository snapshot, Attack Surface Map, model-native thread, Skills, and MCP. The Session retains state that must survive across Stages.

Repository snapshot

The source tree, commit, dependencies, configuration, and scope shared by every Stage.

Attack Surface Map

External entry points, call paths, asset boundaries, and Investigation Units produced upstream.

Thread memory

Model-native conversations and reasoning created or inherited through new, resume, or fork.

Skills + MCP

Audit knowledge for a language, protocol, or vulnerability class, plus Stage-specific tools.

Context can fan out or converge. Investigation Stages run independently for each Investigation Unit, keeping the context focused on one target. Synthesis Stages can read the full result set to compare, filter, deduplicate, or prioritize the next pass.

Evidence and review

Model output must pass evidence checks before review

Agents explore the code, form attack hypotheses, and trace impact. Candidate Findings pass through source-evidence validation, deduplication, severity assessment, and independent verification. ZeroDrift stores the review decision with its supporting evidence instead of accepting raw model prose.

Source-evidence validation

Check that every cited file, code location, and call path matches the target repository.

Deduplication and priority

Merge candidates with the same root cause, then prioritize them by impact and exploitability.

Independent verification

Use source review, local tests, a PoC, or on-chain state to confirm each result.