Tool
Slither
Last updated:
October 7, 2021
[Slither](https://github.com/crytic/slither) is the most popular free [Static Analysis](/codex/static-analysis) tool created by Trail of Bits. It is written in Python and aims to [detect](https://github.com/crytic/slither#detectors) a long-list of vulnerabilities. It is commonly used by several top smart contract auditors and offers an extensive API. License permitting, users can customize slither to detect additional types of vulnerabilities. Slither also contains a wide variety of contract visualization tools called [Printers](https://github.com/crytic/slither/wiki/Printer-documentation). ### How to use Slither The simplest way to use Slither is from a Python virtual environment. Assuming you have Python installed in your system, here is how you can use Slither: ```bash # Create new virtual environment (this example is using conda) conda create --name auditing python=3.9 # Install slither pip3 install slither-analyzer # Check if slither has been linked which slither # If it hasn't, you may have to add its parent path to your profile nano ~/.bash_profile # Finally, enter the parent folder (Hardhat/Truffle/etc.) of your protocol cd your-protocol # And run the analyzer slither . # Run a printer slither ./contracts/Contract.sol --print vars-and-auth ``` For Docker users, Trail of Bits also provide an image with their complete suite of security tools.
See Also: