Welcome! We are the pessimistic.io team, and in recent months we have been actively developing our own Slither detectors to help with code review and audit process. This repository contains everything you may require to work with them!
We increased the sensitivity of our detectors since they are quite straightforward and not written in the "original style." As a result, they produce FPs (False Positives) more frequently than original ones. So that, our detectors are a kind of automation of the checks implemented in the checklist, their main purpose is to look for issues and assist the code auditor.
Please let us know if you have discovered an issue/bug/vulnerability via our custom Slither detectors. You may contact us via opening a PR/Issue or directly, whichever is more convenient for you. If you have any further questions or suggestions, please join our Discord Server or Telegram chat! We hope to see you there, and we intend to support the community and its initiatives!
Section | Link |
---|---|
Docs | Docs for each detector |
Slither_pess | Detectors code |
Tests | Test contracts for detectors |
Utils | Auxiliary files |
Issues | Suggest an idea |
Installation Process | Step-by-Step guide |
Detectors | Detectors table |
Enhancements & New Detectors | Project Improvements |
To install Pessimistic Detectors:
- Install the original Slither;
- Clone our repository;
- Run the following command in our repository folder to add new detectors to Slither:
python3 setup.py develop
Keep in mind that you don't have to reinstall the plugin after changes in the repository!
- Run original Slither as usual.
- Dependencies must be installed in order to test the detectors on our test contracts:
npm install
Detector Link | Docs & Setup | Test Contract | Valid* Issues |
---|---|---|---|
Unprotected Setter | Explore | In progress | 1 |
Unprotected Initialize | Explore | Test | 0 |
TX Gasprice Warning | Explore | Test | 0 |
UniswapV2 Integration | Explore | Test | 0 |
Token Fallback | Explore | Test | 0 |
Timelock Controller | Explore | Test | 0 |
Strange Setter | Explore | Test | 0 |
Read-only Reentrancy | Explore | Test | 0 |
NFT Approve Warning | Explore | Test | 0 |
Multiple Storage Read | Explore | Test | 4 |
Magic Number | Explore | Test | 3 |
Inconsistent Non-Reentrant | Explore | Test | 0 |
Falsy Only EOA Modifier | Explore | Test | 0 |
Missing Event Setter | Explore | Test | 0 |
Dubious Typecast | Explore | Test | 0 |
Double Entry Token Possibility | Explore | In progress | 0 |
Call Forward To Protected | Explore | Test | 0 |
Before Token Transfer | Explore | Test | 1 |
Please note:
-
*Valid - issues included in reports and fixed by developers (January 2023 - March 2023).
-
There is one detector that is disabled by default: pess-uni-v2. It is recommended to run it only on projects that integrate Uniswap V2!
Here we indicate our updates, workflows and mark completed tasks and improvements!
You can add your own detector/idea/enhancement by opening the Issue at the following link.
Prior to adding a custom detector, ensure that:
- In a documentation file, your detector is comprehensively described;
- The detector test contract is presented and correctly compiles;
- The detector code is presented and works properly.
Prior to adding an idea, ensure that:
- Your concept or idea is well articulated;
- A vulnerability example (or PoC) is provided;
Prior to adding an enhancement, ensure that:
- Your enhancement does not make the base code worse;
- Your enhancement is commented.
Task | Status |
---|---|
Opensource current repository | In Process |
Fix - Readonly Reentrancy Detector | Completed |
Suggestion - Write a Walkthrough Article | In Process |
Add UniswapV2 Integration detector | Completed |
Refactor python code. Make it cleaner. | TODO |
Nft-approve-warning detector - remove detection with "this" as a first parameter in "transferFrom()" function | TODO |
Strange-setter detector - remove detection when mappings or structs are set | TODO |
Double-entry-token detector - remove detection of ETH transfers | TODO |
Before-token-transfer detector - remove detection with "virtual" modifier and "super" function call | TODO |
Strange-constructor detector - remove detection of constructor function with base constructor | TODO |
Our team would like to express our deepest gratitude to the Slither tool creators: Josselin Feist, Gustavo Grieco, and Alex Groce, as well as Crytic, Trail of Bits' blockchain security division, and all the people who believe in the original tool and its evolution!
Articles:
- Slither
- How do we use Slither at Pessimistic.io
- Slither Explained
- Slither: In-Depth
- Slither Review
- Slither - Python
- Reentrancy Attacks on Smart Contracts Distilled
- Be sure to check out our blog as well!
Research Papers:
- Slither: A Static Analysis Framework For Smart Contracts
- Detecting Vulnerable Ethereum Smart Contracts via Abstracted Vulnerability Signatures
- Evaluating Smart Contract Static Analysis Tools Using Bug Injection
- A Framework and DataSet for Bugs in Ethereum Smart Contracts
- A Comprehensive Survey of Upgradeable Smart Contract Patterns
Slither: In-Depth
- Accessing Private Data in Smart contracts
- Simplest way to run Slither for your Smart Contract project
- Slither Notes
- Dataset Card for Slither Audited Smart Contracts
- Auditing Tools Report: Slither
- Bridge Security Checklist: Client Side
- Slither & Echidna + Remappings
- Static Analysis of Smart Contracts with Slither & GitHub Actions