NTH

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

November 17, 2026 3 min read
Watch on YouTube
The one-line take

A security architecture aims to keep coding agents useful while preventing malicious instructions from turning their tools into an attack platform.

Key results

252
Benchmark fixtures

Total fixtures in the security evaluation.

100%
Ring 0 attack block rate

Attacks blocked across the benchmark.

0%
Ring 0 false-positive rate

Benign work incorrectly denied.

12.7
Ring 0 median latency

Microseconds per fixture.

98.3%
Qwen3:4B false-positive rate

Benign work rejected by the local LLM judge.

20.0
Product-lattice state-folding latency

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 paper

More in AI Agents

Browse all 77 papers →