ESAA-Security: An Event-Sourced, Verifiable Architecture for Agent-Assisted Security Audits of AI-Generated Code
Elzo Brito dos Santos Filho · 2026
Read ESAA-Security: An Event-Sourced, Verifiable Architecture for Agent-Assisted Security Audits of AI-Generated Code by Elzo Brito dos Santos Filho (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-06365.txt.
Introduction
Brito dos Santos Filho presents ESAA-Security, an ESAA version for agent aided security auditing, on AI made or AI changed code. Prompt based security review suffers uneven coverage, weak reruns, and no fixed audit trail. ESAA keeps guesswork agent cognition apart from set state mutation, using append only events and replay based checks. Review runs as a governed four phase pipeline with 26 tasks, 16 domains, and 95 checks, covering reconnaissance, domain audits, risk classification, and reporting. The method produces ordered outputs including vulnerability lists, risk matrices, and fix guidance.
Catalog record
| CREATOR | Elzo Brito dos Santos Filho |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 26752 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.06365
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
ESAA-Security: An Event-Sourced, Verifiable Architecture for Agent-Assisted Security Audits of AI-Generated Code Elzo Brito dos Santos Filho Abstract AI-assisted software generation has increased development speed, but it has also amplified a persistent engineering problem: systems that are functionally correct may still be structurally insecure. In practice, prompt-based security review with large language models often suffers from uneven coverage, weak reproducibility, unsupported findings, and the absence of an immutable audit trail. The ESAA architecture addresses a related governance problem in agentic software engineering by separating heuristic agent cognition from deterministic state mutation through append-only events, constrained outputs, and replay-based verification [ 1 , 3 , 4 ] . This paper presents ESAA-Security, a domain-specific specialization of ESAA for agent-assisted security auditing of software repositories, with particular emphasis on AI-generated or AI-modified code. ESAA-Security structures auditing as a governed execution pipeline with four phases—reconnaissance, domain audit execution, risk classification, and final reporting—and operationalizes the workflow into 26 tasks, 16 security domains, and 95 executable checks [ 2 ] . The framework produces structured check results, vulnerability inventories, severity classifications, risk matrices, remediation guidance, executive summaries, and a final markdown/JSON audit report. The central idea is that security review should not be modeled as a free-form conversation with an LLM, but as an evidence-oriented audit process governed by contracts and events. In ESAA-Security, agents emit structured intentions under constrained protocols; the orchestrator validates them, persists accepted outputs to an append-only log, reprojects derived views, and verifies consistency through replay and hashing. The result is a traceable, reproducible, and risk-oriented audit architecture whose final report is auditable by construction. 1 Introduction LLM-based software engineering is moving from isolated assistance toward agentic workflows that must preserve consistency across files, tasks, and long execution horizons. Recent work has shown that language models can reason and act through tools, navigate repositories, and participate in multi-agent execution settings [ 5 , 12 , 6 , 7 ] . However, this capability shift also exposes a governance problem: once agents operate over long horizons, mutable state, incomplete context, and unverifiable intermediate steps become operational risks rather than mere prompting inconveniences. The ESAA architecture responds to this problem by treating the event log, not the mutable repository snapshot, as the source of truth, and by deriving project state through deterministic projection, replay, and verification [ 1 , 3 , 4 ] . That shift is particularly relevant in security auditing. In AI-generated software and so-called vibe coding contexts, development speed has increased, but so has the incidence of systems that appear functionally acceptable while remaining weak in authentication, authorization, input validation, secret handling, session control, dependency hygiene, infrastructure hardening, and AI-specific risk handling [ 14 , 15 , 2 ] . The problem is not merely that models can miss vulnerabilities; it is that ad hoc prompt-based review usually leaves scope implicit, findings weakly structured, severity inconsistently assigned, and final conclusions difficult to reproduce or audit [ 2 ] . ESAA-Security is proposed as a domain-specific answer to that problem. Rather than asking an LLM to “review this repository for vulnerabilities” in open prose, ESAA-Security models security review as a governed execution pipeline. The framework inherits ESAA’s event-sourced governance kernel and specializes it for security analysis by defining dedicated phases, task semantics, playbooks, contracts, and output products. In this architecture, findings do not become part of the audit merely because a model wrote persuasive prose. They become part of the audit only after being emitted in structured form, validated under contract, appended to the event log, incorporated into projected views, and preserved under replay-verifiable integrity [ 1 , 2 ] . The core claim of this paper is therefore architectural: agent-assisted security review should be treated as a governed execution problem rather than merely a prompting problem. The relevant question is not only whether vulnerabilities are mentioned, but whether the resulting security assessment is explicit in scope, structured in evidence, reproducible under replay, and traceable from check-level findings to final conclusions. ESAA-Security is designed precisely around that shift. The contributions of this paper are fourfold: 1. We present ESAA-Security as a specialization of the ESAA architecture for evidence-based security auditing of software repositories, especially those produced or heavily modified with AI assistance. 2. We define a governed audit pipeline that combines constrained agent outputs, append-only event persistence, deterministic reprojection, and replay-based verification. 3. We operationalize security review into four phases, 26 tasks, 16 domains, and 95 executable checks, producing structured outputs from check-level findings to a final risk-oriented report. 4. We define an evaluation framing in which the relevant outcome is not only vulnerability enumeration, but also traceability, reproducibility, coverage explicitness, artifact completeness, and remediation usefulness. 2 Background and Related Work 2.1 Agentic Software Engineering and the Governance Gap Recent progress in LLM-based software engineering has shifted the field from isolated conversational assistance toward agentic workflows capable of planning, tool use, repository navigation, and multi-step execution [ 5 , 12 , 6 , 7 ] . This transition increases capability, but it also exposes a structural problem: software work requires consistency across artifacts, tasks, and state transitions over long horizons, whereas language models remain probabilistic generators operating under context constraints. As argued in the ESAA architecture paper, the key difficulty is not merely improving prompts, but establishing a governance kernel that can preserve accountability, reversibility, and state coherence under repeated autonomous actions [ 1 ] . The problem becomes more severe under long-context conditions. Even when large context windows are available, models do not reliably use all relevant information with equal fidelity; performance often degrades when crucial information appears in the middle of long inputs [ 8 ] . For agentic software workflows, this means that instructions, contracts, and earlier evidence can be silently deprioritized. ESAA’s notion of purified views and staged execution responds directly to this risk by minimizing uncontrolled context accumulation and shifting consistency enforcement from model memory to orchestrator logic [ 1 ] . 2.2 Structured Outputs, Deterministic Validation, and State Traceability A second relevant line of work concerns structured generation and output validation. Modern LLM systems increasingly rely on structured or schema-constrained outputs to reduce parsing ambiguity and make model outputs machine-actionable [ 9 , 10 , 11 ] . Grammar-constrained decoding and schema-aware generation reduce syntax errors and improve downstream reliability, but they do not by themselves define how state should evolve across multi-step workflows. ESAA extends this line by requiring agents to emit structured intentions that are validated against contracts and then applied by a deterministic orchestrator, rather than allowing the model to mutate system state directly [ 1 ] . At the architectural level, ESAA is grounded in Event Sourcing and CQRS [ 3 , 4 ] . Event Sourcing treats the append-only event log as the source of truth, while current state is reconstructed as a projection of those events. CQRS complements this by separating write-oriented effect application from read-oriented materialized views. ESAA transposes these principles into agentic software engineering: the agent emits intentions, the orchestrator validates them, accepted events are persisted, and derived views are rebuilt and verified through replay. ESAA-Security directly inherits this model and applies it to security auditing. 2.3 Security Review, Application Security Standards, and AI-Specific Risk The