Skip to main content

Smart contract security scanner for EVM and Solana

Project description

ChainAudit

Smart contract security scanner — Solidity, Solana/Rust, and L2/Arbitrum/Optimism support.

Install

Mac / Linux / Ubuntu

pip install chainaudit
pip install slither-analyzer
pip install solc-select
solc-select install 0.8.24
solc-select use 0.8.24

# Optional — for Solana/Rust scanning
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-audit

Windows

Requires Python 3.12. Download from python.org — check "Add Python to PATH" during install. Python 3.13 not yet supported on Windows.

pip install chainaudit
pip install slither-analyzer
pip install solc-select
solc-select install 0.8.24
solc-select use 0.8.24

If on a college/office network, use mobile hotspot for installation.


Usage

chainaudit scan contract.sol               # Solidity file
chainaudit scan program.rs                 # Solana/Rust program
chainaudit scan ./contracts --recursive    # directory
chainaudit scan contracts.zip              # zip archive
chainaudit scan contract.sol --json        # JSON output
chainaudit scan contract.sol --ml-only     # skip simulation
chainaudit --version                       # show version

Exit code 1 if CRITICAL vulnerabilities found — blocks deployments in CI.


GitHub Action

- uses: aizen299/smart-contract-auditor@v1
  with:
    target: contracts/
    fail-on-critical: true

What It Detects

EVM (Ethereum, Polygon, BNB Chain...)

Severity Examples
CRITICAL Reentrancy, Controlled Delegatecall
HIGH Unchecked Token Transfer, Weak Randomness, tx.origin Auth
MEDIUM Timestamp Dependence, Unchecked Send
LOW Missing Zero Check, Missing Events

L2 / Arbitrum / Optimism — auto-detected

Severity Examples
CRITICAL Cross-Chain Replay Attack, Bridge Reentrancy
HIGH L2 Block Number Assumption, Sequencer Dependence, Address Aliasing
MEDIUM Force-Include Griefing, Gas Price Assumption

Solana / Rust

Severity Examples
CRITICAL Missing Signer Check, Arbitrary CPI, Missing Owner Check
HIGH Integer Overflow, Unsafe Rust Code, CPI Reentrancy, Insecure Randomness
MEDIUM Missing Rent Exemption, PDA Seeds Not Validated
LOW Missing Freeze Authority, Deprecated Anchor Patterns

Detected via cargo-audit (CVE scanning) + pattern scanning on .rs source files.


ML Predictions

Each finding includes an ML-predicted exploitability score (SmartBugs dataset, 88% accuracy).

{
  "title": "Reentrancy",
  "severity": "CRITICAL",
  "ml_exploitability": "CRITICAL",
  "ml_confidence": 0.96,
  "chain": "arbitrum"
}

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chainaudit-1.2.0.tar.gz (626.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chainaudit-1.2.0-py3-none-any.whl (641.5 kB view details)

Uploaded Python 3

File details

Details for the file chainaudit-1.2.0.tar.gz.

File metadata

  • Download URL: chainaudit-1.2.0.tar.gz
  • Upload date:
  • Size: 626.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for chainaudit-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4fecb9ae0369e9f1eb07cd536eed58422e00bafe977678226a345e867df42257
MD5 cdb37d70f9c8894ed9dfcd2dc950badb
BLAKE2b-256 bd7e4e88e09d39b85dd6b318865cbc16580135bdcb597cab786fe117ead864da

See more details on using hashes here.

File details

Details for the file chainaudit-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: chainaudit-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 641.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for chainaudit-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf9713b8061ac4d9b0721715a41b4cb8f6884c484c82ff2bbfcd6ab4938d58a
MD5 1456afb1b5feaebae37d5b103561023e
BLAKE2b-256 0d0f5228ed72e107362d9f962c3ace8b7287f568e0c65e13e9e95b2063c2cd32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page