arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.00314cs.CRcs.AIcs.PL
收藏

Semia:通过约束引导的表示合成审计代理技能

Semia: Auditing Agent Skills via Constraint-Guided Representation Synthesis

University of California, Santa Barbara(加州大学圣芭芭拉分校);University of California, Los Angeles(加州大学洛杉矶分校);University of California, San Diego(加州大学圣地亚哥分校)

Hongbo Wen, Ying Li, Hanzhi Liu, Chaofan Shou, Yanju Chen, Yuan Tian, Yu Feng

AI总结:

Semia通过约束引导的表示合成技术,对代理技能进行静态审计,发现超过一半的技能存在关键语义风险,其召回率和F1值显著优于传统方法。

摘要:

代理技能是一种配置包,为由大语言模型驱动的代理提供具体能力,如阅读电子邮件、执行shell命令或签署区块链交易。每个技能是混合型artifact——结构部分声明可执行接口,而文本部分规定何时以及如何触发这些接口,并在每次调用时概率性地重新解释文本。传统静态分析器解析结构部分但忽略文本部分;基于LLM的工具读取文本部分但无法可靠地证明受污染输入达到高影响sink。我们提出了Semia,一种代理技能的静态审计器。Semia将每个技能提升到Skill Description Language(SDL),一种Datalog事实库,捕捉LLM触发的动作、文本定义的条件和人类在循环中的检查点。合成一个结构上健全且语义上忠实于原始文本的事实库是核心挑战;我们通过约束引导的表示合成(CGRS)解决这一问题,这是一种提出-验证-评估循环,通过细化LLM候选者直到收敛。安全属性(例如间接注入、秘密泄露、困惑代理、未受保护的sink等)可以转换为Datalog可达性查询。我们对13728个现实世界的技能进行了评估,发现Semia使所有技能可审计,并发现超过一半的技能至少存在一个关键语义风险。在541个专家标注的技能样本上,Semia实现了97.7%的召回率和90.6%的F1值,显著优于基于签名的扫描器和LLM基线。

英文摘要:

An agent skill is a configuration package that equips an LLM-driven agent with a concrete capability, such as reading email, executing shell commands, or signing blockchain transactions. Each skill is a hybrid artifact-a structured half declares executable interfaces, while a prose half dictates when and how those interfaces fire-and the prose is reinterpreted probabilistically on every invocation. Conventional static analyzers parse the structured half but ignore the prose; LLM-based tools read the prose but cannot reproducibly prove that a tainted input reaches a high-impact sink. We present Semia, a static auditor for agent skills. Semia lifts each skill into the Skill Description Language (SDL), a Datalog fact base that captures LLM-triggered actions, prose-defined conditions, and human-in-the-loop checkpoints. Synthesizing a fact base that is both structurally sound and semantically faithful to the original prose is the central challenge; we address it with Constraint-Guided Representation Synthesis (CGRS), a propose-verify-evaluate loop that refines LLM candidates until convergence. Security properties (e.g., indirect injection, secret leakage, confused deputies, unguarded sinks, etc.) over an agent skill can then be reduced to Datalog reachability queries. We evaluate Semia on 13,728 real-world skills from public marketplaces. Semia renders all of them auditable and finds that more than half carry at least one critical semantic risk. On a stratified sample of 541 expert-labeled skills, Semia achieves 97.7% recall and an F1 of 90.6%, substantially outperforming signature-based scanners and LLM baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑