arXiv:2605.13940cs.CRcs.AI2026-05被引 5

测试大模型代理在第三方技能中的运行时信任风险

AgentTrap: Measuring Runtime Trust Failures in Third-Party Agent Skills

论文配图:AgentTrap: Measuring Runtime Trust Failures in Third-Party Agent Skills
图 1 · 摘自论文原文
  • 设计动态基准,模拟恶意工作流伪装成正常任务
  • 141个任务中91个为恶意,检测出模型常忽略隐蔽危害
  • 强调需在真实执行环境中评估代理安全,非仅文本输入

第三方技能正成为大模型代理的可复用工具包,整合自然语言指令、脚本、模板和配置。这虽提升效率,也带来新安全威胁:恶意技能无需诱导模型执行明显有害操作,而是将危害行为嵌入常规工作流,利用高权限和低人工监督完成攻击。本文提出AgentTrap,一个动态基准,用于评估代理在使用第三方技能时对运行时恶意行为的防御能力。该基准包含141项任务:91项恶意任务与50项良性实用任务,覆盖16个源于代理-技能供应链威胁的安全维度。每个任务中,代理接收普通用户请求,在沙盒环境中运行已安装技能(可能含恶意元素),系统根据完整执行轨迹判断攻击是否成功、是否被阻止、未触发攻击或无攻击证据。核心发现是:最危险的失败并非简单越狱,模型常完成表面任务,却将技能引入的不安全副作用视为正常流程。这凸显必须在用户实际委托工作的具体模型-框架-工作区环境中进行运行时评估。代码与数据已公开于https://github.com/zhmzm/AgentTrap 和 https://huggingface.co/datasets/zhmzm/AgentTrap。

原文摘要 · Abstract (English)

Third-party skills are becoming the package ecosystem for LLM agents. They package natural-language instructions, helper scripts, templates, documents, and service configuration into reusable workflows. This makes skills useful, but it also introduces a new security problem: a malicious skill does not need to ask the model to perform an obviously harmful action. Instead, it can disguise the harmful behavior as part of a routine workflow, relying on the agent to execute that workflow with high-value permissions and limited human supervision. We introduce AgentTrap, a dynamic benchmark for evaluating whether LLM agents can use third-party skills while resisting malicious runtime behavior. AgentTrap contains 141 tasks: 91 malicious tasks and 50 benign utility tasks, covering 16 security-impact dimensions grounded in agent-skill supply-chain threats. In each task, the agent receives an ordinary user request, runs with installed skills that may contain malicious workflow elements, and is executed in a sandboxed environment. AgentTrap then judges complete trajectories for attack success, blocked or refused behavior, attack-not-triggered cases, and no-attack-evidence outcomes. Our central finding is that the most informative failures are not simple jailbreaks. Models often complete the visible user task while treating unsafe side effects introduced by the skill as part of the normal workflow. This motivates runtime evaluation of the concrete model--framework--workspace environment in which users actually delegate work. Code and data are available at https://github.com/zhmzm/AgentTrap and https://huggingface.co/datasets/zhmzm/AgentTrap.

大模型安全代理系统供应链攻击运行时检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。