- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.2k
Description
This is a tracker for additional static analysis beyond what solc outputs. Static analysis can apply to things like safety, optimization and code style. Currently a few projects implement different components and aspects
- https://github.com/crytic/slither
- https://github.com/eth-sri/securify2
- https://github.com/trailofbits/manticore
- https://github.com/ConsenSys/mythril
Most of these tools seem to focus on security. For example securify2 tries to tackle the SWC registry where the solidity compiler fails
I took a brief look at Slither to see the complexity of implementing their Detector list. Each detector loops through the nodes in Slither's own intermediate representation known as SlithIR. SlithIR gets built by visiting the AST output given by crytic-compile. The IR attempts to provide additional data to the AST by adding variable references, scopes and the type information for builtin functions and variables. Internally, the Slither uses a visitor pattern for converting the AST to the IR, which seems to translate fairly nicely to the visitor exposed for solang-parser Parse Tree. I think the real challenge will be to create an incremental IR representation from the Parse Tree ignoring completeness but offering correctness so that we may build the static analysis tool over time. Luckily, the simplicity of Solidity scopes, as well as the strong typing of solidity, should make this a lot easier.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status