From Attack Surface to Defense Architecture: Compositional Security for Agentic Coding Harnesses
AuthorsSimon Hegelich, Bardh Prenkaj, Habiba Sarhan, Morteza Shahrezaye, Kolja Hegelich, Christian Montag, Ralf Schneider, Erik Cambria
AffiliationsEvercursion – GaiaLogic Unipessoal Lda · University of Macau · Allianz Group · Nanyang Technological University, Singapore
A security architecture aims to keep coding agents useful while preventing malicious instructions from turning their tools into an attack platform.
Key results
Total fixtures in the security evaluation.
Attacks blocked across the benchmark.
Benign work incorrectly denied.
Microseconds per fixture.
Benign work rejected by the local LLM judge.
Microseconds per trajectory step.
What the paper found
The paper presents ActiveSecHarness, a security architecture for coding agents that treats compromise as an operating-system and permission-composition problem, not a model behavior problem. Its central rule is that models may propose actions but cannot grant themselves authority: a Ring 0 reference monitor checks every tool call and OS resource operation using attenuating HMAC capability tokens, a product lattice separating provenance trust from data sensitivity, and a shared-workspace provenance ledger that blocks cross-agent secret laundering. Deterministic guards also mediate paths, processes, archives, network connections, credentials, and tool integrity, while code verification and repair operate alongside human security education. On a 252-fixture benchmark, Ring 0 achieved a 100% attack block rate with a 0% false-positive rate at 12.7 µs median latency. The local Qwen3:4B judge, run through Ollama, also blocked all attacks but falsely rejected 98.3% of benign work and took 142.3 ms; the paper reports Ring 0 was 11,200× faster. In trajectory tests, a stateless policy modeled on Conseca missed 4 of 12 attack chains, while a coarse Boolean taint lock rejected 10 of 12 benign workflows. The product lattice and provenance ledger blocked all tested attack chains, allowed all benign workflows, and folded state in 20.0 µs per step. The authors argue that capable models—including Gemini 1.5 Pro for policy generation—belong in planning and review, while deterministic controls retain authority at the execution boundary.
Original abstract
AI coding harnesses couple language models to shells, filesystems, and network sockets, turning the harness into an automated Living-off-the-Land (LotL) platform: once an adversary injects instructions into retrieved content, dual-use binaries such as bash, curl, and find become the payload. We argue that security in agentic systems is a structural property of the cognitive architecture and permission composition rather than an emergent property of individual models. Static regex blacklists miss structural evasions, whereas LLM-as-a-Judge guardrails incur high latency while over-blocking benign work. We present ActiveSecHarness, a neurosymbolic reference-monitor architecture built around Separation of Intelligence and Authority. It combines (1) Macaroon-inspired HMAC capability tokens across four Trust and Authority Rings, (2) a 2D product taint lattice $\mathcal{L} = \mathcal{L}_{\mathrm{trust}} \times \mathcal{L}_{\mathrm{sens}}$ and a workspace provenance ledger that prevents secret laundering across disk, (3) deterministic Ring-0 OS/tool guards, and (4) bytecode certificates, split-horizon audit logs, self-healing security test synthesis, and an adaptive UserWikiManager. Across $N=252$ fixtures ($120$ attack, $120$ benign, $12$ kill chains), a live local LLM judge (qwen3:4b) refuses $98.3\%$ of benign work at $142.3\,\mathrm{ms}$ latency, whereas Ring 0 achieves $\mathrm{ABR}=1.000$ and $\mathrm{FPR}=0.000$ in $12.7\,μ\mathrm{s}$ ($11{,}200\times$ faster). In a multi-step trajectory ablation, an oracle Conseca-style stateless policy misses $4/12$ kill chains ($\mathrm{ABR}=0.667$) and coarse Boolean taint blocks $83.3\%$ of benign workflows, while our 2D product lattice achieves $\mathrm{ABR}=1.000$ and $\mathrm{FPR}=0.000$ at $\approx 20\,μ\mathrm{s}$ per step.
Read the original paperMore in AI Agents
Browse all 77 papers →HarnessFlow: MCTS-Guided Harness Optimization for LLM Agents
Zhi Hong, Qianlong Wang, Hongchen Wei, Aidan Wu, Daohong Ying, Mingze Kong, Bei Liu, Chong Luo
HarnessFlow uses tree search and a coding agent to automatically refine the software harnesses that guide LLM agents.
Test-Time Compute Scales Better with Parallel Agent Teams
Junlin Wang, Haozhe Chen, Ang Li, Rahul Chalamala, Zhuang Liu
Instead of choosing between many solo agents and one huge team, run many small teams in parallel and keep the strongest result.
Experience-Handoff Reinforcement Learning for Recursive Self-Improvement
Doyoung Kim, Byeongguk Jeon, Kailin Zhang, Sherry Yang
The work trains an AI agent not only to act, but also to write useful playbooks that help its future attempts succeed.