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.
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.
Audit Session
Source, scope, threads, Artifacts, and state
Attack Surface Map
Entry points, assets, and sensitive paths
Investigation Units
Target × risk angle × evidence needs
Agent Runtime
Attack surface, call paths, hypotheses, and evidence
Finding Pipeline
Convergence, deduplication, triage, and review
Session · Stage · Turn · dependsOn
Attack Surface Map · Per-unit analysis · Global synthesis
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.
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.
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.
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.
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.
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.
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.