mvmax-dev/solidity-scanner-demo

GitHub: mvmax-dev/solidity-scanner-demo

该项目通过一个包含蓄意漏洞的演示合约,展示 Solidity Security Scanner PRO GitHub Action 如何在 CI 流程中自动检测智能合约安全问题。

Stars: 1 | Forks: 0

# 🔍 Solidity Security Scanner — 实时演示 本仓库演示了 **[Solidity Security Scanner PRO](https://github.com/marketplace/actions/automated-smart-contract-auditor-pro)** GitHub Action 的实际运行效果。 ## ⚠️ 蓄意漏洞 [`VulnerableVault.sol`](contracts/VulnerableVault.sol) 合约包含以下**蓄意**漏洞: | # | 漏洞 | 严重性 | 行号 | |---|--------------|----------|------| | 1 | **重入攻击** — 状态更新前进行外部调用 | 🔴 严重 | 22-24 | | 2 | **未受保护的 `selfdestruct`** | 🟠 高危 | 29-31 | | 3 | 循环中**未缓存的数组长度** | 🟡 中危 | 35 | | 4 | 循环中的**后置递增**(gas 浪费) | 🟡 中危 | 35 | | 5 | **`tx.origin` 身份验证** | 🟠 高危 | 41 | ## 🚀 工作原理 当你推送代码或创建 PR 时,扫描器会自动: 1. 检测所有 `.sol` 文件 2. 运行静态分析(Slither + 启发式引擎) 3. 在存在漏洞的行上发布行内评论 4. 输出带有严重性评分的 JSON 报告 ## 📦 在你的 Repo 中安装 ``` # .github/workflows/audit.yml name: "Security Audit" on: [pull_request] jobs: audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: mvmax-dev/solidity-security-scanner@main with: github_token: ${{ secrets.GITHUB_TOKEN }} ``` ## ⭐ 链接 - **[从 Marketplace 安装](https://github.com/marketplace/actions/automated-smart-contract-auditor-pro)** - **[主仓库](https://github.com/mvmax-dev/solidity-security-scanner)** - **[报告问题](https://github.com/mvmax-dev/solidity-security-scanner/issues)**
标签:Solidity, 云安全监控, 智能合约, 静态分析