Skip to content

v0.8.3

Compare
Choose a tag to compare
@montyly montyly released this 21 Apr 17:00
· 1898 commits to master since this release

0.8.3 - 2022-04-21

This release lets users to enhance Slither through code comments (see example below), adds a new tool to read variable storage values on-chain (slither-read-storage), removes false positives in existing detectors, improves Solidity 0.8 support, and fixes several bugs. Slither also now supports Foundry.

Please use our slither-action for CI integration!

Enhancing Slither through code comments

In the following code:

  • @custom:security non-reentrant before the variable declaration will indicate to Slither that the external calls from this variable are non-reentrant
  • @custom:security write-protection="onlyOwner()" will indicate to Slither that writing to this variable must be done through onlyOwner
contract ReentrancyAndWrite{

    /// @custom:security non-reentrant
    /// @custom:security write-protection="onlyOwner()"
    I external_contract;

    modifier onlyOwner(){
        // lets assume there is an access control
        _;
    }   

    mapping(address => uint) balances;

    function withdraw() public{
        uint balance = balances[msg.sender];

        external_contract.external_call();

        balances[msg.sender] = 0;
        payable(msg.sender).transfer(balance);
    }
    
    function set_protected() public onlyOwner(){
        external_contract = I(msg.sender);
    }  

    function set_not_protected() public{
        external_contract = I(msg.sender);
    }
}

Please let us know what you think of this code comment feature! Share your ideas on Github, or join us on Slack. We're looking for new use cases and feedback.

Thanks to our contributors for this release:

Added

  • Enhanced analyses through code comments (#1089)
  • slither-read-storage (#968)
  • New printer to identify misuse of whenNotPaused (#1128)
  • slither-action in the README (#1053)
  • Solidity support
    • user defined types (#1135)
    • top level variables (#1032)
    • string.concat (#1086)
    • .offset/length in yul (#1085)
    • unary operation on constant (#1094)
  • Support for ERC4626, 2612 in slither-check-erc (#1111)
  • pip-audit in the CI (#1006)
  • Template for github issue (#1044, #1083)

Improved

  • Remove FPs in detectors:
  • Solidity support
    • custom error lookup (#1156)
    • Function lookup for bytes (#1163)
    • ternary operator (#1162)
    • Top-level structure with import (#1068)
    • Top level with custom error (#1131)
  • Notification when the config file is missing (#1041, #1054)
  • Github super linter improvements (#1023, #1045, #1088, #1157)
  • slither-check-erc output (#1016)
  • Typo in missing zero validation detector (#1037)
  • slither-prop support for builder (#712)
  • Improved to the Echidna printer (#878, #1132)
  • Improve determinism for detector results (#1049)
  • Python type hint (#1055)
  • Unit tests for the AST parsing (#1069, #1118, #1101)
  • Auto install of solc versions in the CI (#1073)
  • Show ignored findings by default for the checklist (#1082)
  • Typo in slither-mutate (#1104)
  • Move to f-strings (#1107, #1110)
  • Multiple minors improvements to slither-flat (#1125)
  • Prioritize ignore comment over exclude dependencies (#1120)
  • Windows support (#1065, #1137)
  • Crytic-compile@0.2.3 - which adds Foundry support

Fixed

  • Missing json output for printers #1012
  • Infinite loop in the RTLO detector (#1108)
  • Infinite recursion in show_ignore_findings (#1092)