Deep-0610/DeAI-Security-Agent
GitHub: Deep-0610/DeAI-Security-Agent
结合 Slither 静态分析与 CrewAI 多智能体推理的智能合约自动化审计平台,旨在以更低成本检测 EVM 漏洞并通过链上证明保障审计报告的不可篡改性。
Stars: 0 | Forks: 0
# DeAI-Security-Agent
DeAI Security Agent 是一个自动化智能合约审计平台,它将静态代码分析与多智能体 AI 相结合,以捕获 Web3 漏洞。利用 Slither AST 解析、CrewAI 推理和 Qdrant RAG 漏洞利用上下文,它可以检测出复杂的 bug。FastAPI 后端会对最终报告进行哈希处理,并在 EVM 测试网上铸造不可篡改的审计证明。
# 🛡️ DeAI Security Agent
[](https://www.python.org/)
[](https://fastapi.tiangolo.com/)
[](https://soliditylang.org/)
[](https://www.crewai.com/)
[](https://qdrant.tech/)
[](https://opensource.org/licenses/MIT)
一个端到端的自动化智能合约安全审计平台。通过将确定性的静态代码分析与多智能体 LLM 推理流水线以及检索增强生成(RAG)相结合,**DeAI Security Agent** 能够检测复杂的 EVM 漏洞,消除 LLM 幻觉,并在 EVM 测试网上铸造防篡改的审计证书。
## 🎯 问题陈述与解决方案
* **问题:** 传统的智能合约审计速度慢、成本极其高昂(1万至10万美元以上)且依赖人工。相反,仅仅依赖原始的 LLM prompt 会导致高误报率,并且由于缺乏确定性的执行上下文,会遗漏一些状态处理的边缘情况。
* **解决方案:** 一个将确定性静态分析(Slither)与自主 AI 智能体(CrewAI)相结合的混合流水线。该系统将 Solidity 代码解析为抽象语法树(AST),在包含历史黑客攻击事件的向量数据库(Qdrant)中进行搜索,模拟漏洞利用,并通过 Polygon 或 Arbitrum 测试网在链上发布不可篡改的加密证明。
## 🏗️ 系统架构与工作流
```
┌─────────────────────────────────────────┐
│ User Submits Solidity Code (.sol) │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Static Analysis & AST Extraction │
│ (Slither Compiler & CFG Generator) │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Qdrant Vector DB (Context Retrieval) │
│ - SWC Registry Knowledge │
│ - Historical Hack Post-Mortems │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Multi-Agent Orchestration Engine │
│ 1. Security Planner Agent │
│ 2. Deep Vulnerability Auditor │
│ 3. Exploit PoC Simulator │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ FastAPI Engine & Audit Report Gen │
│ (Report SHA-256 Hashing / IPFS Pin) │
└────────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ On-Chain Audit Attestation │
│ (AuditRegistry.sol on EVM Testnet) │
└─────────────────────────────────────────┘
```
标签:RAG, Solidity, Web3安全, 多智能体AI, 智能合约审计, 逆向工具, 错误基检测, 静态代码分析