| Crates.io | stealth-scanner |
| lib.rs | stealth-scanner |
| version | 0.4.0 |
| created_at | 2026-01-18 03:00:45.0623+00 |
| updated_at | 2026-01-18 03:00:45.0623+00 |
| description | A Solidity security scanner that detects common vulnerabilities through static analysis with intelligent pattern recognition |
| homepage | https://github.com/saintparish4/stealth |
| repository | https://github.com/saintparish4/stealth |
| max_upload_size | |
| id | 2051673 |
| size | 229,830 |
Version 0.4.0
A Solidity security scanner that detects common vulnerabilities through static analysis with intelligent pattern recognition.
I built Stealth to address false positives that plague other security scanners. Traditional tools flag legitimate DeFi patterns (like user withdrawals and staking) as vulnerabilities, creating noise that obscures real issues. Stealth understands modern smart contract patterns and provides accurate, actionable security insights.
Stealth parses Solidity contracts and identifies security issues before deployment. It provides confidence levels to help you prioritize fixes and supports both single file and recursive directory scanning, with output in terminal or JSON formats for CI/CD integration.
| Category | Severity | Description | Enhancements |
|---|---|---|---|
| Reentrancy Detection | HIGH | Identifies external calls followed by state changes | Visibility-aware confidence scoring |
| Unchecked External Calls | MEDIUM | Catches missing return value checks on .call() |
High confidence pattern matching |
| tx.origin Authentication | HIGH | Flags insecure use of tx.origin for access control |
Definitive anti-pattern detection |
| Missing Access Control | HIGH | Detects sensitive functions without auth checks | Self-service pattern recognition |
| Dangerous Delegatecall | CRITICAL | Warns about user-controlled delegatecall targets | Parameter analysis for user control |
| Timestamp Dependence | MEDIUM-HIGH | Flags dangerous timestamp patterns (modulo, equality) | View/pure function awareness |
| Unsafe Randomness | HIGH | Detects use of block properties for randomness | Pattern-based detection (keccak256, blockhash) |
| Integer Overflow/Underflow | HIGH | Detects unsafe arithmetic in Solidity <0.8 and unchecked blocks | Version-aware detection |
| Flash Loan Vulnerability | HIGH | Identifies price manipulation and unvalidated callbacks | Spot price vs TWAP detection |
| Storage Collision (Proxy) | CRITICAL-HIGH | Detects missing storage gaps and unprotected initializers | Upgradeable contract patterns |
| Front-Running Susceptibility | MEDIUM-HIGH | Catches missing slippage protection, approval race conditions | Swap/withdraw pattern analysis |
| DoS via Unbounded Loops | HIGH | Detects gas griefing and external calls in loops | Array iteration analysis |
| Unchecked ERC20 Return Values | HIGH | Flags missing SafeERC20 usage | Transfer/approve pattern detection |
Smart Analysis Capabilities:
| Technology | Purpose |
|---|---|
| Rust | Core scanner engine (performance & safety) |
| Cargo | Build system & package manager |
| Solidity | Target language for vulnerability detection |
| Next.js | Web interface for the scanner |
| Vercel | Hosting platform for web application |
| GitHub Actions | CI/CD workflow support |
# Install the latest version from crates.io
cargo install stealth-scanner
# After installation, use the 'stealth' command
stealth scan ./contracts --recursive
# Clone the repository
git clone https://github.com/saintparish4/stealth.git
cd stealth
# Build from source
cd core
cargo build --release
# The binary will be at core/target/release/stealth
# Optional: Install globally from source
cargo install --path .
# After installation, you can use 'stealth' command directly
stealth scan ./contracts --recursive
# Using cargo run (development)
cd core
# Scan a single file
cargo run --release -- scan contracts/reentrancy-vulnerable.sol
# Scan a directory recursively
cargo run --release -- scan contracts --recursive
# Get JSON output
cargo run --release -- scan contracts/reentrancy-vulnerable.sol --format json
# Scan directory with JSON output
cargo run --release -- scan contracts --recursive --format json > results.json
# Using installed binary (after cargo install)
stealth scan contracts/reentrancy-vulnerable.sol
stealth scan contracts --recursive
stealth scan contracts --recursive --format json > results.json
# Using Make (recommended)
make scan # Scan contracts/ directory
make scan FILE=core/contracts/reentrancy-vulnerable.sol
make scan FILE=core/contracts
make scan-debug # Faster compilation for testing
Stealth provides exit codes for CI/CD pipelines:
| Exit Code | Meaning |
|---|---|
0 |
No vulnerabilities found |
1 |
Non-critical vulnerabilities found |
2 |
Critical vulnerabilities found |
# In your CI/CD script
cd core
cargo run --release -- scan contracts --recursive --format json
EXIT_CODE=$?
if [ $EXIT_CODE -eq 2 ]; then
echo "Critical vulnerabilities found! Blocking deployment."
exit 1
fi
See .github/workflows/stealth-security-scan.yml for a complete example.
- name: Run Stealth Scan
run: |
cd core
cargo run --release -- scan ./contracts --recursive --format json
Terminal (default):
cd core
cargo run --release -- scan contracts/comprehensive-vulnerabilities.sol
Clean, colored output with statistics summary.
JSON:
cd core
cargo run --release -- scan contracts/comprehensive-vulnerabilities.sol --format json
Machine-readable format for tool integration.
stealth scan [PATH] [OPTIONS]
Arguments:
<PATH> Path to Solidity file or directory
Options:
-f, --format <FORMAT> Output format: terminal or json [default: terminal]
-r, --recursive Recursively scan directories
-h, --help Print help
-V, --version Print version
Stealth focuses on detecting common vulnerability patterns through static analysis. It does not:
For production deployments, I recommend using Stealth alongside professional audits and comprehensive testing.
Contributions are welcome. Please open an issue to discuss proposed changes before submitting a pull request.
Stealth includes a modern web interface built with Next.js. The web application provides:
The web application is deployed on Vercel. For deployment instructions, see:
web/DEPLOYMENT.md - Complete deployment guideweb/QUICK_START.md - Quick reference for common taskscd web
npm install
npm run dev
# Open http://localhost:3000
cd web
vercel --prod
The web application automatically includes the Rust scanner binary, which is built and bundled during the CI/CD process.
MIT