0xTorielle/slither-ai
GitHub: 0xTorielle/slither-ai
Stars: 0 | Forks: 0
# 🐍 Slither-AI
**AI-enhanced static analysis for Solidity smart contracts** — written in Rust.
Slither-AI scans Solidity source files for common vulnerability patterns and produces a detailed report with severity ratings.
## Features
- 🔍 Detects **12+ vulnerability patterns** including reentrancy, unchecked sends, tx.origin auth, delegatecall exploits, and more
- 📊 Severity scoring: Critical, High, Medium, Low
- 📁 Scan single files or entire project directories
- 🖥️ Text (colored terminal) or JSON output
- ⚡ Fast — built in Rust
## Detected Vulnerabilities
| Detector | Severity |
|---|---|
| Reentrancy | Critical |
| Delegatecall to Untrusted | Critical |
| Unprotected Selfdestruct | Critical |
| Arbitrary Location Write | Critical |
| Unchecked Send | High |
| tx.origin Authentication | High |
| Uninitialized Storage Pointer | High |
| Integer Overflow/Underflow | Medium |
| Weak Pseudo-Random Number | Medium |
| Missing Access Control | Medium |
| Dangerous ERC20 Interface | Medium |
| Floating Pragma | Low |
## Installation
cargo install --path .
## Usage
# Scan a single file
slither-ai --path contracts/Token.sol
# Scan a directory, show only medium+ severity
slither-ai --path ./contracts --severity medium
# JSON output
slither-ai --path ./contracts --format json
# All options
slither-ai --path ./contracts --severity high --format json
### CLI Options
| Flag | Description | Default |
|---|---|---|
| `--path`, `-p` | Solidity file or directory to scan | (required) |
| `--severity`, `-s` | Minimum severity: `low`, `medium`, `high`, `critical` | `low` |
| `--format`, `-f` | Output format: `text`, `json` | `text` |
## Example Output
═══════════════════════════════════════════════
Slither-AI Static Analysis Report
═══════════════════════════════════════════════
📄 contracts/Vault.sol
[Critical] Reentrancy (line 15)
External call before state update — vulnerable to reentrancy attacks.
[High] Unchecked Send (line 16)
Return value of send/call not checked.
═══════════════════════════════════════════════
Total findings: 2
Critical: 1 High: 1 Medium: 0 Low: 0
═══════════════════════════════════════════════
## Running Tests
cargo test
## License
MIT
标签:通知系统