为大模型代理部署设计了集成生命周期的安全架构,防住攻击者从执行框架下手。
SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deployment

- 将四层防御直接嵌入代理运行全流程,包括输入过滤、决策验证等
- 在五种攻击场景下,不安全行为率降低38%,攻击成功率下降42%
- 适合关注大模型代理安全的开发者与系统架构师
大语言模型代理的性能高度依赖于执行框架(harness),该层负责工具调用、上下文管理与状态持久化。然而其核心地位也使其成为高价值攻击面:一旦框架被攻破,攻击可贯穿整个执行流程。现有安全方法存在结构错配,无法感知框架内部状态,也无法跨阶段协同防护。本文提出 SafeHarness,一种将四层防御机制直接融入代理生命周期的安全架构:输入处理阶段的对抗性上下文过滤、决策阶段的分层因果验证、动作执行阶段的权限隔离工具控制,以及状态更新阶段的安全回滚与自适应降级。跨层机制根据持续异常自动升级验证强度、触发回滚并收紧权限。我们在多种框架配置下的基准数据集上评估,对比四种基线,在五种攻击场景、六类威胁中,相比无保护基线,平均降低约38%的UBR和42%的ASR,显著减少不安全行为与攻击成功率,同时保持核心任务可用性。
原文摘要 · Abstract (English)
The performance of large language model (LLM) agents depends critically on the execution harness, the system layer that orchestrates tool use, context management, and state persistence. Yet this same architectural centrality makes the harness a high-value attack surface: a single compromise at the harness level can cascade through the entire execution pipeline. We observe that existing security approaches suffer from structural mismatch, leaving them blind to harness-internal state and unable to coordinate across the different phases of agent operation. In this paper, we introduce \safeharness{}, a security architecture in which four proposed defense layers are woven directly into the agent lifecycle to address above significant limitations: adversarial context filtering at input processing, tiered causal verification at decision making, privilege-separated tool control at action execution, and safe rollback with adaptive degradation at state update. The proposed cross-layer mechanisms tie these layers together, escalating verification rigor, triggering rollbacks, and tightening tool privileges whenever sustained anomalies are detected. We evaluate \safeharness{} on benchmark datasets across diverse harness configurations, comparing against four security baselines under five attack scenarios spanning six threat categories. Compared to the unprotected baseline, \safeharness{} achieves an average reduction of approximately 38\% in UBR and 42\% in ASR, substantially lowering both the unsafe behavior rate and the attack success rate while preserving core task utility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。