tradingstrategy-ai/openaudit
GitHub: tradingstrategy-ai/openaudit
整合十余个社区审计技能库的多代理智能合约安全审计系统,支持多链生态的自动化漏洞检测与报告生成。
Stars: 0 | Forks: 0
# OpenAudit
[](https://github.com/tradingstrategy-ai/openaudit/actions/workflows/ci.yml)
OpenAudit 是一个 Claude Code/OpenAI Codex 元技能,它通过多个基于代理的审计技能流水线并行运行智能合约源代码。通过结合 10 多个社区审计技能库中的 100 多项技能,OpenAudit 利用不同的方法论、漏洞数据库和静态分析工具,提供全面且免费的智能合约安全分析。
该技能已经非常完善,任何软件开发人员都可以进行基础的智能审计。你可以将该技能指向部署在任何链上的智能合约,并获取有关其安全性的基础审计报告。无需订阅或注册,100% 开源。

## 目录
- [工作原理](#how-it-works)
- [支持的代理流水线](#supported-agent-pipelines)
- [前置条件](#prerequisites)
- [克隆](#clone)
- [macOS (Homebrew)](#macos-homebrew)
- [Linux](#linux)
- [Windows](#windows)
- [使用方法](#usage)
- [示例](#examples)
- [配置](#configuration)
- [版本历史](#version-history)
- [支持](#support)
- [社交媒体](#social-media)
[阅读公告文章](https://x.com/moo9000/status/2029511848525971928)。
## 工作原理
1. 我们设置用于智能合约审计和与链交互的软件工具
2. 将此技能指向一个智能合约地址
3. 它会分析部署信息(代理模式、特权地址、多签设置)
4. 针对项目运行多个审计技能流水线
5. 每个审计流水线生成自己的报告,存储在 `out` 文件夹中
6. 查找针对同一合约的现有审计报告并进行交叉引用
7. 最后编写一份经过去重和交叉引用的总结报告
该技能支持 Solidity、Vyper、Anchor (Rust) 和 CosmWasm (Rust) 智能合约。
该技能位于 [skills/openaudit/SKILL.md](./skills/openaudit/SKILL.md)。
## 支持的代理流水线
这些是开源的、社区维护的技能库,我们将针对要审计的智能合约运行它们:
| 库 | Stars | 技能数 | 代码行数 | 语言 | 贡献者 | Twitter |
| ------------------------------------------------------------------------ | ----: | ----------------: | ---------: | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [trailofbits/skills](./deps/trailofbits-skills) | 3,274 | 58 | 73,636 | Solidity, Cairo, Cosmos, Algorand, Substrate, Solana (Move), Go, Rust, Python, C/C++ | [dguido](https://github.com/dguido), [Ninja3047](https://github.com/Ninja3047), [GrosQuildu](https://github.com/GrosQuildu), [ahpaleus](https://github.com/ahpaleus), [dariushoule](https://github.com/dariushoule), [DarkaMaul](https://github.com/DarkaMaul), [hbrodin](https://github.com/hbrodin), [bsamuels453](https://github.com/bsamuels453), [mosajjal](https://github.com/mosajjal), [frabert](https://github.com/frabert), [sblackshear](https://github.com/sblackshear), [vanhauser-thc](https://github.com/vanhauser-thc) + 7 more | [@trailofbits](https://x.com/trailofbits) |
| [pashov/skills](./deps/pashov-skills) | 156 | 1 | 1,461 | Solidity | [pashov](https://github.com/pashov), [Daneided](https://github.com/Daneided) | [@pashov](https://x.com/pashov) |
| [Cyfrin/solskill](./deps/cyfrin-solskill) | 96 | 1 | 350 | Solidity | [PatrickAlphaC](https://github.com/PatrickAlphaC) | [@PatrickAlphaC](https://x.com/PatrickAlphaC) |
| [kadenzipfel/scv-scan](./deps/kadenzipfel-scv-scan) | 77 | 1 | 2,784 | Solidity | [kadenzipfel](https://github.com/kadenzipfel) | [@0xkaden](https://x.com/0xkaden) |
| [forefy/.context](./deps/forefy-context) | 70 | 3 | 15,371 | Solidity, Anchor (Solana), Vyper | [forefy](https://github.com/forefy) | [@forefy](https://x.com/forefy) |
| [quillai-network/qs_skills](./deps/quillai-qs-skills) | 62 | 10 | 8,528 | Solidity | [ChitranshVashney](https://github.com/ChitranshVashney), [michaeldim](https://github.com/michaeldim) | [@QuillAudits_AI](https://x.com/QuillAudits_AI) |
| [Archethect/sc-auditor](./deps/archethect-sc-auditor) | 47 | 1 + 4 MCP tools | 1,285 | Solidity | [Archethect](https://github.com/Archethect) | [@archethect](https://x.com/archethect) |
| [hackenproof-public/skills](./deps/hackenproof-skills) | 7 | 1 | 300 | Solidity, general web/mobile | [dorsky](https://github.com/dorsky) | [@d0rsky](https://x.com/d0rsky) |
| [auditmos/skills](./deps/auditmos-skills) | 0 | 14 | 12,981 | Solidity | [tkowalczyk](https://github.com/tkowalczyk) | [@tomkowalczyk](https://x.com/tomkowalczyk) |
| [Frankcastleauditor/safe-solana-builder](./deps/frankcastle-safe-solana) | 47 | 1 | 1,607 | Rust (Solana Anchor + Native) | [Frankcastleauditor](https://github.com/Frankcastleauditor), [Arrowana](https://github.com/Arrowana) | [@0xcastle_chain](https://x.com/0xcastle_chain) |
| [The-Membrane/membrane-core](./deps/membrane-core) | 10 | 1 | 3,267 | CosmWasm (Rust) | [triccs](https://github.com/triccs) | — |
## 前置条件
这些技能需要访问相关工具,如 Solidity 编译器、基于 Python 的 [Slither](https://github.com/crytic/slither) 或基于 Rust 的 [Foundry](https://www.getfoundry.sh/)。我们还使用 [web3-ethereum-defi](https://web3-ethereum-defi.tradingstrategy.ai/) 和 [Web3.py](https://web3py.readthedocs.io/en/stable/) 包通过 RPC 读取链上数据。
### 克隆
递归克隆仓库以获取技能 - 目前不支持像 PyPi 这样的打包安装方式:
```
git clone --recursive --depth 1 https://github.com/tradingstrategy-ai/openaudit.git
```
### macOS (Homebrew)
安装并检查依赖项:
```
# Python 3.11+
# Node 22+
brew install python uv brew codeql node rustup aderyn semgrep
# Rust toolchain (可选 — Aderyn static analyser 需要)
rustup-init
# Foundry (forge — downloads verified contract source code)
curl -L https://foundry.paradigm.xyz | bash
foundryup
# 使用 Python uv packaging tool 安装 Slither
uv sync
# 安装 Slither 可用的 Solidity compiler
SOLIDITY_VERSION=0.8.34 && uv run solc-select install $SOLIDITY_VERSION && uv run solc-select use $SOLIDITY_VERSION
```
获取报告以确认一切安装正确:
```
scripts/check-prerequisites.sh
```
然后编辑 [env.sh](./env.sh.example),包含必要的区块链 RPC API 密钥、Etherscan API 密钥等。
```
cp env.sh.example env.sh
```
你需要将 RPC 添加到部署合约的链上,然后添加任何其他可能需要的 API 密钥,比如用于读取已验证智能合约源代码的 Etherscan:
```
export JSON_RPC_ETHEREUM=
export ETHERSCAN_API_KEY=
```
如果没有我们要读取的链的 RPC API 密钥,技能流水线将无法工作,因为我们正在审计已部署的合约及其变量值。对于读取源代码,相比于专有付费的 Etherscan,我们更推荐开源的 [Sourcify](https://sourcify.dev/),但由于专有工具的历史原因,源代码可能需要 Etherscan API 密钥。如果需要,可以使用 [Chainlist](https://chainlist.org/) 获取免费的 RPC 节点 API。
### Linux
```
TODO
```
### Windows
不支持。
## 使用方法
在 Claude Code/Codex/Visual Studio Code 中打开此仓库。
通过将技能指向区块链浏览器上的智能合约来使用它:
```
/openaudit https://etherscan.io/address/0x657d9ABA1DBb59e53f9F3eCAA878447dCfC96dCb
```
你的 AI 将开始处理此任务:

完成后,你会得到摘要,报告会写入 [out](./out/) 文件夹:

## 示例
请参阅 [YieldNest OpenAudit 报告示例](./docs/examples/openaudit-yieldnest-0x657d9a.md) 及其 [部署发现](./docs/examples/addresses-yieldnest-0x657d9a.md),了解控制方面的弱点。
## 配置
该技能已被教导使用 Python 和 Web3.py 读取多个区块链。
[在此查看如何配置区块链 RPC](https://web3-ethereum-defi.tradingstrategy.ai/api/provider/_autosummary_provider/eth_defi.provider.env?highlight=env#)。例如,`JSON_RPC_ARBITRUM` 用于 Arbirum RPC。
使用 [env.sh](./env.sh.example) 来设置技能所需的 RPC API 密钥等。
你可以使用 [get-block-number](./skills/get-block-number/SKILL.md]) 技能来测试 RPC:
```
/get-block-number arbitrum
```
应该会给出:
```
Chain: Arbitrum
Latest block number: 439,218,227
```
## 版本历史
- [阅读变更日志](https://github.com/tradingstrategy-ai/web3-ethereum-defi/blob/master/CHANGELOG.md)。
## 支持
- [加入 Discord 提问](https://tradingstrategy.ai/community)。
## 社交媒体
- [在 Twitter 上关注](https://twitter.com/TradingProtocol)
- [在 Telegram 上关注](https://t.me/trading_protocol)
- [在 LinkedIn 上关注](https://www.linkedin.com/company/trading-strategy/)
- [在 YouTube 上关注](https://www.youtube.com/@tradingstrategyprotocol)
# 许可证
MIT。
[由 Trading Strategy 创建](https://tradingstrategy.ai)。
标签:Anchor, Claude Code, CosmWasm, DeFi安全, DevSecOps, MITM代理, OpenAI Codex, PyRIT, Rust, Solidity, Vyper, Web3安全, 上游代理, 云安全监控, 人工智能, 代理模式分析, 代码安全, 免费工具, 区块链安全, 去中心化应用, 可视化界面, 多智能体系统, 安全专业人员, 安全报告生成, 对称加密, 开源安全工具, 插件化架构, 智能合约审计, 漏洞枚举, 用户模式Hook绕过, 社区维护, 网络流量审计, 自动化审计, 跨链分析, 逆向工具, 逆向工程平台, 静态分析