Beyond Predefined Sinks: Security-Aware Dependency Analysis for LLM Agents

📄 arXiv: 2610.03014v1 📥 PDF

作者: Hang Cui

分类: cs.CR, cs.AI

发布日期: 2026-10-02

备注: 29 pages, 3 figures, including supplementary appendices. Preprint


💡 一句话要点

提出AgentSecGraph框架以解决LLM代理的安全依赖分析问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 安全分析 大型语言模型 代理依赖图 静态分析 软件安全 上下文分析 依赖关系

📋 核心要点

  1. 现有的安全分析方法通常依赖于预定义的敏感操作,无法全面评估安全影响。
  2. 本文提出的AgentSecGraph框架通过构建安全感知代理依赖图,增强了对操作身份的理解。
  3. 实验结果表明,Security-ADG在保留上下文信息和保护证据方面显著优于传统方法。

📝 摘要(中文)

基于大型语言模型(LLM)的代理越来越多地将模型生成的决策与安全敏感的软件能力连接起来,如命令执行、文件系统访问、网络通信等。现有分析方法通常依赖于预定义的敏感操作,但仅凭操作身份不足以判断安全影响。本文提出了AgentSecGraph,一个安全感知的静态分析框架,为每个安全敏感操作构建候选中心的安全感知代理依赖图(Security-ADG),并增强了操作身份的信息,结合了代理相关性、源和依赖证据、信任边界上下文、保护证据和外部效应语义。此外,本文还介绍了AgentSecBench,一个涵盖67个真实世界LLM代理库的语料库,分析结果显示,Security-ADG在保留上下文和观察到的保护方面表现优异。

🔬 方法详解

问题定义:本文旨在解决现有安全分析方法在评估LLM代理与安全敏感操作之间关系时的不足,尤其是仅依赖操作身份无法全面判断安全影响的问题。

核心思路:论文提出的AgentSecGraph框架通过构建安全感知代理依赖图(Security-ADG),将操作身份与代理相关性、源和依赖证据等信息结合,从而更全面地评估安全影响。

技术框架:该框架的整体架构包括数据收集、候选操作识别、依赖图构建和上下文分析等主要模块。每个模块相互协作,形成完整的安全分析流程。

关键创新:最重要的技术创新在于引入了安全感知的依赖图,能够识别和分析与安全相关的上下文信息,这一方法显著区别于传统的仅依赖敏感操作身份的分析方式。

关键设计:在设计中,框架考虑了多个关键参数,如信任边界的定义、保护证据的收集方式等,确保了分析的全面性和准确性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Security-ADG在保留91.1%的参考上下文和所有观察到的保护方面表现优异,相比之下,传统的仅依赖敏感操作身份的方法仅保留20.0%的上下文信息。这表明,安全感知的依赖分析能够提供更深刻的安全洞察。

🎯 应用场景

该研究的潜在应用领域包括安全敏感软件的开发和审计,尤其是在使用大型语言模型的自动化工具中。通过提供更全面的安全分析,能够有效降低安全风险,提升软件的安全性和可靠性。

📄 摘要(原文)

Large language model (LLM)-based agents increasingly connect model-generated decisions to security-sensitive software capabilities such as command execution, filesystem access, network communication, browser control, and external tools. Existing analyses often use predefined sensitive operations as anchors, but operation identity alone is insufficient to determine security implications. We present AgentSecGraph, a security-aware static analysis framework that constructs a candidate-centered Security-Aware Agent Dependency Graph (Security-ADG) for each security-sensitive operation. It augments operation identity with agent relevance, source and dependency evidence, trust-boundary context, guard evidence, and external-effect semantics. We further introduce AgentSecBench, a corpus of 67 real-world LLM-agent repositories spanning 11 ecosystems and 37,542 source files. The current analyzer identifies 23,866 static security-sensitive operation candidates across 65 repositories and emits one Security-ADG artifact per candidate. Corpus-wide analysis recovers source-to-operation dependency evidence for 9,821 candidates (41.15%) and potential guard evidence for 3,075 (12.88%), completing in 50.8 minutes. Using a separate reproduction-backed evaluation layer, we establish 22 security-sensitive behaviors across 13 repositories: one confirmed vulnerability, one pending disclosure candidate, and 20 guarded behaviors. In nine held-out cases, Security-ADG preserves 91.1% of the reference context and all five observed guards, compared with 20.0% for a sink-only view and 40.0% for a simplified ADG. These results show that security-aware dependency and contextual evidence enable distinctions that cannot be recovered from sensitive-operation identity alone.