pact-audit-free
v1.0.2
Published
Free smart contract security scanner using Slither static analysis
Downloads
7
Maintainers
Readme
PACT Audit Free
Free smart contract security scanner using Slither static analysis by Habify Labs.
About
PACT Audit Free is the community edition of PACT Audit, owned and developed by Habify Labs. This tool provides free smart contract security scanning to help developers identify vulnerabilities before deployment.
Features
- 🔍 Static Analysis - Powered by Slither analyzer
- 🆓 Completely Free - No API keys or subscriptions required
- ⚡ Fast & Lightweight - Minimal dependencies, quick installation
- 🎯 Easy to Use - Simple CLI interface
- 📊 Clean Output - Professional vulnerability reporting
- 🔄 CI/CD Ready - JSON output and proper exit codes
- 🌍 Cross-Platform - Works on Windows, macOS, and Linux
Installation
Prerequisites
First, install Slither analyzer:
# Using pip
pip install slither-analyzer
# Using pip3
pip3 install slither-analyzer
# On macOS with Homebrew
brew install slither-analyzerInstall PACT Audit Free
npm install -g pact-audit-freeUsage
Basic Scanning
# Scan a single Solidity file
pact-audit-free scan MyContract.sol
# Scan all Solidity files in a directory
pact-audit-free scan contracts/Output Options
# Save results to JSON file
pact-audit-free scan MyContract.sol --output results.json
# Output JSON to stdout (useful for CI/CD)
pact-audit-free scan MyContract.sol --jsonExample Output
🔍 PACT Audit Free - Slither Security Scanner
Free smart contract security analysis
══════════════════════════════════════════════
🎯 Target: /path/to/MyContract.sol
📋 Validating target path...
✅ Path validation passed
🔧 Checking Slither installation...
✅ Slither is installed and ready
🔍 Running Slither security analysis...
✅ Scan completed
📊 SCAN RESULTS
══════════════
Summary:
HIGH: 1
MEDIUM: 2
LOW: 1
Details:
1. [HIGH] reentrancy-eth
Reentrancy vulnerability in withdraw function
📍 MyContract.sol:45
2. [MEDIUM] missing-zero-check
Missing zero address validation in transfer
📍 MyContract.sol:23
3. [MEDIUM] unprotected-upgrade
Function lacks access control
📍 MyContract.sol:67
4. [LOW] unused-return
Return value not used
📍 MyContract.sol:12
⚠️ HIGH SEVERITY ISSUES DETECTED - Review required before deployment!Exit Codes
0- No issues or only low/informational issues1- Medium severity issues detected2- High severity issues detected
Perfect for CI/CD integration:
# This will fail the build if high/medium issues are found
pact-audit-free scan contracts/ || exit 1JSON Output Format
When using --output or --json, the tool outputs structured data:
{
"timestamp": "2024-01-15T10:30:00.000Z",
"target": "/path/to/contracts",
"vulnerabilities": [
{
"type": "reentrancy-eth",
"severity": "HIGH",
"description": "Reentrancy vulnerability in withdraw function",
"sourceMapping": {
"filename": "MyContract.sol",
"lines": [45]
},
"confidence": "high",
"impact": "high"
}
],
"summary": {
"total": 4,
"high": 1,
"medium": 2,
"low": 1,
"informational": 0
}
}Supported Vulnerability Types
PACT Audit Free detects all vulnerabilities that Slither can find, including:
- Reentrancy vulnerabilities
- Access control issues
- Integer overflow/underflow
- Unprotected functions
- Missing zero address checks
- Timestamp dependencies
- Gas optimization opportunities
- Code quality issues
- And many more...
Requirements
- Node.js 16.0.0 or higher
- Slither analyzer installed via pip
- Python 3.6+ (for Slither dependency)
Troubleshooting
Slither Not Found
If you get a "Slither not found" error:
- Ensure Python and pip are installed
- Install Slither:
pip install slither-analyzer - Verify installation:
slither --version - If using virtual environments, ensure Slither is installed in the active environment
Permission Issues
If you encounter permission issues on macOS/Linux:
# Install with sudo if needed
sudo npm install -g pact-audit-free
# Or use npx to run without installing globally
npx pact-audit-free scan MyContract.solComparison
| Feature | PACT Audit Free | Raw Slither | Premium Tools | |---------|----------------|-------------|---------------| | Price | Free | Free | $$ | | Ease of use | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ | | Setup time | < 1 min | ~5 min | ~15 min | | Clean output | ✅ | ❌ | ✅ | | JSON export | ✅ | ⚠️ | ✅ | | CI/CD ready | ✅ | ⚠️ | ✅ |
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
MIT License - see LICENSE file for details.
Related Projects
- pact-audit - Enterprise version with AI analysis
- Slither - The underlying static analysis framework
- PACT Protocol - Complete DeFi security ecosystem
Support
About Habify Labs
PACT Audit is owned and developed by Habify Labs, a leading blockchain security company focused on making smart contract auditing accessible to all developers.
Made with ❤️ by Habify Labs
