arXiv:2505.15242cs.CRcs.AI2025-05被引 5

动态规划+执行框架提升智能合约审计准确率

Adaptive Plan-Execute Framework for Smart Contract Security Auditing

  • 根据合约特点动态生成并调整审计计划
  • 关键漏洞检测准确率达100%,覆盖41.2%已知弱点
  • 适合自动化审计团队与区块链安全研究者

大型语言模型在代码分析中展现出巨大潜力,但仍存在幻觉和上下文推理能力不足的问题。本文提出SmartAuditFlow,一种新型的Plan-Execute框架,通过动态审计规划与结构化执行提升智能合约安全分析效果。与传统固定流程不同,该框架基于合约特性动态生成并迭代优化审计计划,根据中间LLM输出和新发现漏洞实时调整策略,确保评估更精准。框架分步执行计划,结合结构化推理降低幻觉与误报。通过引入迭代提示优化及外部知识源(如静态分析工具、RAG),使审计决策具备上下文感知性并依托真实安全知识,生成完整报告。多基准测试表明,SmartAuditFlow在常见与高危漏洞上达到100%准确率,对真实项目中已知弱点的综合覆盖率为41.2%,成功识别全部13个测试的CVE。结果证明其在可扩展性、成本效益与适应性上优于传统静态分析工具和现有LLM方法,是自动智能合约审计的可靠解决方案。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have shown great promise in code analysis and auditing; however, they still struggle with hallucinations and limited context-aware reasoning. We introduce SmartAuditFlow, a novel Plan-Execute framework that enhances smart contract security analysis through dynamic audit planning and structured execution. Unlike conventional LLM-based auditing approaches that follow fixed workflows and predefined steps, SmartAuditFlow dynamically generates and refines audit plans based on the unique characteristics of each smart contract. It continuously adjusts its auditing strategy in response to intermediate LLM outputs and newly detected vulnerabilities, ensuring a more adaptive and precise security assessment. The framework then executes these plans step by step, applying a structured reasoning process to enhance vulnerability detection accuracy while minimizing hallucinations and false positives. To further improve audit precision, SmartAuditFlow integrates iterative prompt optimization and external knowledge sources, such as static analysis tools and Retrieval-Augmented Generation (RAG). This ensures audit decisions are contextually informed and backed by real-world security knowledge, producing comprehensive security reports. Extensive evaluations across multiple benchmarks demonstrate that SmartAuditFlow outperforms existing methods, achieving 100 percent accuracy on common and critical vulnerabilities, 41.2 percent accuracy for comprehensive coverage of known smart contract weaknesses in real-world projects, and successfully identifying all 13 tested CVEs. These results highlight SmartAuditFlow's scalability, cost-effectiveness, and superior adaptability over traditional static analysis tools and contemporary LLM-based approaches, establishing it as a robust solution for automated smart contract auditing.

智能合约LLM审计安全检测动态规划

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