From 0e86f3d3045fd3669e19824ff950b160438c26c1 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Fri, 23 Jun 2023 11:23:22 -0500 Subject: [PATCH 01/19] 0.9.4 --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 70d4f71fd4..798d439369 100644 --- a/setup.py +++ b/setup.py @@ -8,15 +8,15 @@ description="Slither is a Solidity static analysis framework written in Python 3.", url="https://github.com/crytic/slither", author="Trail of Bits", - version="0.9.3", + version="0.9.4", packages=find_packages(), python_requires=">=3.8", install_requires=[ "packaging", "prettytable>=3.3.0", "pycryptodome>=3.4.6", - # "crytic-compile>=0.3.1,<0.4.0", - "crytic-compile@git+https://github.com/crytic/crytic-compile.git@dev#egg=crytic-compile", + "crytic-compile>=0.3.2,<0.4.0", + # "crytic-compile@git+https://github.com/crytic/crytic-compile.git@dev#egg=crytic-compile", "web3>=6.0.0", "eth-abi>=4.0.0", "eth-typing>=3.0.0", From 6cb36a2efdf820ca143f9c371b274659271a9889 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Mon, 26 Jun 2023 13:23:53 -0500 Subject: [PATCH 02/19] use published release of solc-select --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 798d439369..9695a8fc01 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ "coverage[toml]", "filelock", "pytest-insta", - "solc-select@git+https://github.com/crytic/solc-select.git@query-artifact-path#egg=solc-select", + "solc-select>=1.0.4", ], "doc": [ "pdoc", From 1f40e9269b0c3dc23d45ad2ee8e86237d266c4f9 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 27 Jun 2023 08:20:54 -0500 Subject: [PATCH 03/19] 0.9.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9695a8fc01..e7019b1aac 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ description="Slither is a Solidity static analysis framework written in Python 3.", url="https://github.com/crytic/slither", author="Trail of Bits", - version="0.9.4", + version="0.9.5", packages=find_packages(), python_requires=">=3.8", install_requires=[ From f3be9efad61672ba5e97189f73b055f7734d455a Mon Sep 17 00:00:00 2001 From: sam bacha Date: Thu, 6 Jul 2023 07:51:56 -0700 Subject: [PATCH 04/19] docs(readme): add new docs link (#2010) * docs(readme): add new docs link Fix the status badges and include a link to the documentation page that is now generated * docs(citation): create CITATION.cff This creates a `CITATION.cff` file. The information is taken from arXiv's bibtex for the whitepaper: ```bibtex @inproceedings{Feist_2019, doi = {10.1109/wetseb.2019.00008}, url = {https://doi.org/10.1109%2Fwetseb.2019.00008}, year = 2019, month = {may}, publisher = {{IEEE} }, author = {Josselin Feist and Gustavo Grieco and Alex Groce}, title = {Slither: A Static Analysis Framework for Smart Contracts}, booktitle = {2019 {IEEE}/{ACM} 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain ({WETSEB})} } ``` --- CITATION.cff | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 60 +++++++++++++++++++++++++++++++----------------- 2 files changed, 103 insertions(+), 21 deletions(-) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000000..605bd60e5f --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,64 @@ +cff-version: 1.2.0 +title: Slither Analyzer +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Josselin + family-names: Feist + - given-names: Gustavo + family-names: Grieco + - given-names: Alex + family-names: Groce +identifiers: + - type: doi + value: 10.48550/arXiv.1908.09878 + description: arXiv.1908.09878 + - type: url + value: 'https://arxiv.org/abs/1908.09878' + description: arxiv + - type: doi + value: 10.1109/wetseb.2019.00008 +repository-code: 'https://github.com/crytic/slither' +url: 'https://www.trailofbits.com/' +repository-artifact: 'https://github.com/crytic/slither/releases' +abstract: >- + Slither is a static analysis framework designed to provide + rich information about Ethereum smart contracts. + + It works by converting Solidity smart contracts into an + intermediate representation called SlithIR. + + SlithIR uses Static Single Assignment (SSA) form and a + reduced instruction set to ease implementation of analyses + while preserving semantic information that would be lost + in transforming Solidity to bytecode. + + Slither allows for the application of commonly used + program analysis techniques like dataflow and taint + tracking. + + + Our framework has four main use cases: + + (1) automated detection of vulnerabilities, + + (2) automated detection of code optimization + opportunities, + + (3) improvement of the user's understanding of the + contracts, and + + (4) assistance with code review. +keywords: + - Ethereum + - Static Analysis + - Smart contracts + - EVM + - bug detection + - Software Engineering +license: AGPL-3.0-only +commit: 3d4f934d3228f072b7df2c5e7252c64df4601bc8 +version: 0.9.5 +date-released: '2023-06-28' diff --git a/README.md b/README.md index cb815561e8..18c1c62268 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,40 @@ -# Slither, the Solidity source analyzer +Slither Static Analysis Framework Logo -Logo +# [Slither, the Solidity source analyzer](https://crytic.github.io/slither/slither.html) [![Build Status](https://img.shields.io/github/actions/workflow/status/crytic/slither/ci.yml?branch=master)](https://github.com/crytic/slither/actions?query=workflow%3ACI) -[![Slack Status](https://empireslacking.herokuapp.com/badge.svg)](https://empireslacking.herokuapp.com) -[![PyPI version](https://badge.fury.io/py/slither-analyzer.svg)](https://badge.fury.io/py/slither-analyzer) - -Slither is a Solidity static analysis framework written in Python3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses. - -- [Features](#features) -- [Usage](#usage) -- [How to Install](#how-to-install) -- [Detectors](#detectors) -- [Printers](#printers) -- [Tools](#tools) -- [API Documentation](#api-documentation) -- [Getting Help](#getting-help) -- [FAQ](#faq) -- [Publications](#publications) +![PyPI](https://img.shields.io/pypi/v/slither-analyzer?logo=python&logoColor=white&label=slither-analyzer) +[![Slither - Read the Docs](https://img.shields.io/badge/Slither-Read_the_Docs-2ea44f)](https://crytic.github.io/slither/slither.html) +[![Slither - Wiki](https://img.shields.io/badge/Slither-Wiki-2ea44f)](https://github.com/crytic/slither/wiki/SlithIR) + +> Join the Empire Hacking Slack +> +> [![Slack Status](https://slack.empirehacking.nyc/badge.svg)](https://slack.empirehacking.nyc/) +> > - Discussions and Support + + +**Slither** is a Solidity static analysis framework written in Python3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses. + + * [Features](#features) + * [Usage](#usage) + * [How to install](#how-to-install) + + [Using Pip](#using-pip) + + [Using Git](#using-git) + + [Using Docker](#using-docker) + + [Integration](#integration) + * [Detectors](#detectors) + * [Printers](#printers) + + [Quick Review Printers](#quick-review-printers) + + [In-Depth Review Printers](#in-depth-review-printers) + * [Tools](#tools) + * [API Documentation](#api-documentation) + * [Getting Help](#getting-help) + * [FAQ](#faq) + * [License](#license) + * [Publications](#publications) + + [Trail of Bits publication](#trail-of-bits-publication) + + [External publications](#external-publications) + ## Features @@ -36,7 +53,7 @@ Slither is a Solidity static analysis framework written in Python3. It runs a su Run Slither on a Hardhat/Foundry/Dapp/Brownie application: -```bash +```console slither . ``` @@ -44,18 +61,19 @@ This is the preferred option if your project has dependencies as Slither relies However, you can run Slither on a single file that does not import dependencies: -```bash +```console slither tests/uninitialized.sol ``` ## How to install -Slither requires Python 3.8+. +> **Note**
+> Slither requires Python 3.8+. If you're **not** going to use one of the [supported compilation frameworks](https://github.com/crytic/crytic-compile), you need [solc](https://github.com/ethereum/solidity/), the Solidity compiler; we recommend using [solc-select](https://github.com/crytic/solc-select) to conveniently switch between solc versions. ### Using Pip -```bash +```console pip3 install slither-analyzer ``` From e5f2a86f0906fd62c6c4eccb9dbfa5ab30671a78 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Thu, 6 Jul 2023 11:05:58 -0500 Subject: [PATCH 05/19] 0.9.6 (#2031) * 0.9.6 * lint readme --- README.md | 125 +++++++++++++++++++++++++++--------------------------- setup.py | 5 +-- 2 files changed, 64 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 18c1c62268..1a0d203c7d 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,51 @@ -Slither Static Analysis Framework Logo - # [Slither, the Solidity source analyzer](https://crytic.github.io/slither/slither.html) +Slither Static Analysis Framework Logo + [![Build Status](https://img.shields.io/github/actions/workflow/status/crytic/slither/ci.yml?branch=master)](https://github.com/crytic/slither/actions?query=workflow%3ACI) ![PyPI](https://img.shields.io/pypi/v/slither-analyzer?logo=python&logoColor=white&label=slither-analyzer) [![Slither - Read the Docs](https://img.shields.io/badge/Slither-Read_the_Docs-2ea44f)](https://crytic.github.io/slither/slither.html) [![Slither - Wiki](https://img.shields.io/badge/Slither-Wiki-2ea44f)](https://github.com/crytic/slither/wiki/SlithIR) > Join the Empire Hacking Slack -> +> > [![Slack Status](https://slack.empirehacking.nyc/badge.svg)](https://slack.empirehacking.nyc/) > > - Discussions and Support - **Slither** is a Solidity static analysis framework written in Python3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses. - * [Features](#features) - * [Usage](#usage) - * [How to install](#how-to-install) - + [Using Pip](#using-pip) - + [Using Git](#using-git) - + [Using Docker](#using-docker) - + [Integration](#integration) - * [Detectors](#detectors) - * [Printers](#printers) - + [Quick Review Printers](#quick-review-printers) - + [In-Depth Review Printers](#in-depth-review-printers) - * [Tools](#tools) - * [API Documentation](#api-documentation) - * [Getting Help](#getting-help) - * [FAQ](#faq) - * [License](#license) - * [Publications](#publications) - + [Trail of Bits publication](#trail-of-bits-publication) - + [External publications](#external-publications) - +* [Features](#features) +* [Usage](#usage) +* [How to install](#how-to-install) + * [Using Pip](#using-pip) + * [Using Git](#using-git) + * [Using Docker](#using-docker) + * [Integration](#integration) +* [Detectors](#detectors) +* [Printers](#printers) + * [Quick Review Printers](#quick-review-printers) + * [In-Depth Review Printers](#in-depth-review-printers) +* [Tools](#tools) +* [API Documentation](#api-documentation) +* [Getting Help](#getting-help) +* [FAQ](#faq) +* [License](#license) +* [Publications](#publications) + * [Trail of Bits publication](#trail-of-bits-publication) + * [External publications](#external-publications) ## Features -- Detects vulnerable Solidity code with low false positives (see the list of [trophies](./trophies.md)) -- Identifies where the error condition occurs in the source code -- Easily integrates into continuous integration and Hardhat/Foundry builds -- Built-in 'printers' quickly report crucial contract information -- Detector API to write custom analyses in Python -- Ability to analyze contracts written with Solidity >= 0.4 -- Intermediate representation ([SlithIR](https://github.com/trailofbits/slither/wiki/SlithIR)) enables simple, high-precision analyses -- Correctly parses 99.9% of all public Solidity code -- Average execution time of less than 1 second per contract -- Integrates with Github's code scanning in [CI](https://github.com/marketplace/actions/slither-action) +* Detects vulnerable Solidity code with low false positives (see the list of [trophies](./trophies.md)) +* Identifies where the error condition occurs in the source code +* Easily integrates into continuous integration and Hardhat/Foundry builds +* Built-in 'printers' quickly report crucial contract information +* Detector API to write custom analyses in Python +* Ability to analyze contracts written with Solidity >= 0.4 +* Intermediate representation ([SlithIR](https://github.com/trailofbits/slither/wiki/SlithIR)) enables simple, high-precision analyses +* Correctly parses 99.9% of all public Solidity code +* Average execution time of less than 1 second per contract +* Integrates with Github's code scanning in [CI](https://github.com/marketplace/actions/slither-action) ## Usage @@ -102,9 +100,9 @@ docker run -it -v /home/share:/share trailofbits/eth-security-toolbox ### Integration -- For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action). -- To generate a Markdown report, use `slither [target] --checklist`. -- To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`) +* For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action). +* To generate a Markdown report, use `slither [target] --checklist`. +* To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`) ## Detectors @@ -200,23 +198,24 @@ Num | Detector | What it Detects | Impact | Confidence For more information, see -- The [Detector Documentation](https://github.com/crytic/slither/wiki/Detector-Documentation) for details on each detector -- The [Detection Selection](https://github.com/crytic/slither/wiki/Usage#detector-selection) to run only selected detectors. By default, all the detectors are run. -- The [Triage Mode](https://github.com/crytic/slither/wiki/Usage#triage-mode) to filter individual results +* The [Detector Documentation](https://github.com/crytic/slither/wiki/Detector-Documentation) for details on each detector +* The [Detection Selection](https://github.com/crytic/slither/wiki/Usage#detector-selection) to run only selected detectors. By default, all the detectors are run. +* The [Triage Mode](https://github.com/crytic/slither/wiki/Usage#triage-mode) to filter individual results ## Printers + ### Quick Review Printers -- `human-summary`: [Print a human-readable summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#human-summary) -- `inheritance-graph`: [Export the inheritance graph of each contract to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#inheritance-graph) -- `contract-summary`: [Print a summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#contract-summary) -- `loc`: [Count the total number lines of code (LOC), source lines of code (SLOC), and comment lines of code (CLOC) found in source files (SRC), dependencies (DEP), and test files (TEST).](https://github.com/trailofbits/slither/wiki/Printer-documentation#loc) +* `human-summary`: [Print a human-readable summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#human-summary) +* `inheritance-graph`: [Export the inheritance graph of each contract to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#inheritance-graph) +* `contract-summary`: [Print a summary of the contracts](https://github.com/trailofbits/slither/wiki/Printer-documentation#contract-summary) +* `loc`: [Count the total number lines of code (LOC), source lines of code (SLOC), and comment lines of code (CLOC) found in source files (SRC), dependencies (DEP), and test files (TEST).](https://github.com/trailofbits/slither/wiki/Printer-documentation#loc) ### In-Depth Review Printers -- `call-graph`: [Export the call-graph of the contracts to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#call-graph) -- `cfg`: [Export the CFG of each functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#cfg) -- `function-summary`: [Print a summary of the functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#function-summary) -- `vars-and-auth`: [Print the state variables written and the authorization of the functions](https://github.com/crytic/slither/wiki/Printer-documentation#variables-written-and-authorization) -- `not-pausable`: [Print functions that do not use `whenNotPaused` modifier](https://github.com/trailofbits/slither/wiki/Printer-documentation#when-not-paused). +* `call-graph`: [Export the call-graph of the contracts to a dot file](https://github.com/trailofbits/slither/wiki/Printer-documentation#call-graph) +* `cfg`: [Export the CFG of each functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#cfg) +* `function-summary`: [Print a summary of the functions](https://github.com/trailofbits/slither/wiki/Printer-documentation#function-summary) +* `vars-and-auth`: [Print the state variables written and the authorization of the functions](https://github.com/crytic/slither/wiki/Printer-documentation#variables-written-and-authorization) +* `not-pausable`: [Print functions that do not use `whenNotPaused` modifier](https://github.com/trailofbits/slither/wiki/Printer-documentation#when-not-paused). To run a printer, use `--print` and a comma-separated list of printers. @@ -224,13 +223,13 @@ See the [Printer documentation](https://github.com/crytic/slither/wiki/Printer-d ## Tools -- `slither-check-upgradeability`: [Review `delegatecall`-based upgradeability](https://github.com/crytic/slither/wiki/Upgradeability-Checks) -- `slither-prop`: [Automatic unit test and property generation](https://github.com/crytic/slither/wiki/Property-generation) -- `slither-flat`: [Flatten a codebase](https://github.com/crytic/slither/wiki/Contract-Flattening) -- `slither-check-erc`: [Check the ERC's conformance](https://github.com/crytic/slither/wiki/ERC-Conformance) -- `slither-format`: [Automatic patch generation](https://github.com/crytic/slither/wiki/Slither-format) -- `slither-read-storage`: [Read storage values from contracts](./slither/tools/read_storage/README.md) -- `slither-interface`: [Generate an interface for a contract](./slither/tools/interface/README.md) +* `slither-check-upgradeability`: [Review `delegatecall`-based upgradeability](https://github.com/crytic/slither/wiki/Upgradeability-Checks) +* `slither-prop`: [Automatic unit test and property generation](https://github.com/crytic/slither/wiki/Property-generation) +* `slither-flat`: [Flatten a codebase](https://github.com/crytic/slither/wiki/Contract-Flattening) +* `slither-check-erc`: [Check the ERC's conformance](https://github.com/crytic/slither/wiki/ERC-Conformance) +* `slither-format`: [Automatic patch generation](https://github.com/crytic/slither/wiki/Slither-format) +* `slither-read-storage`: [Read storage values from contracts](./slither/tools/read_storage/README.md) +* `slither-interface`: [Generate an interface for a contract](./slither/tools/interface/README.md) See the [Tool documentation](https://github.com/crytic/slither/wiki/Tool-Documentation) for additional tools. @@ -244,23 +243,23 @@ Documentation on Slither's internals is available [here](https://crytic.github.i Feel free to stop by our [Slack channel](https://empireslacking.herokuapp.com) (#ethereum) for help using or extending Slither. -- The [Printer documentation](https://github.com/trailofbits/slither/wiki/Printer-documentation) describes the information Slither is capable of visualizing for each contract. +* The [Printer documentation](https://github.com/trailofbits/slither/wiki/Printer-documentation) describes the information Slither is capable of visualizing for each contract. -- The [Detector documentation](https://github.com/trailofbits/slither/wiki/Adding-a-new-detector) describes how to write a new vulnerability analyses. +* The [Detector documentation](https://github.com/trailofbits/slither/wiki/Adding-a-new-detector) describes how to write a new vulnerability analyses. -- The [API documentation](https://github.com/crytic/slither/wiki/Python-API) describes the methods and objects available for custom analyses. +* The [API documentation](https://github.com/crytic/slither/wiki/Python-API) describes the methods and objects available for custom analyses. -- The [SlithIR documentation](https://github.com/trailofbits/slither/wiki/SlithIR) describes the SlithIR intermediate representation. +* The [SlithIR documentation](https://github.com/trailofbits/slither/wiki/SlithIR) describes the SlithIR intermediate representation. ## FAQ How do I exclude mocks or tests? -- View our documentation on [path filtering](https://github.com/crytic/slither/wiki/Usage#path-filtering). +* View our documentation on [path filtering](https://github.com/crytic/slither/wiki/Usage#path-filtering). How do I fix "unknown file" or compilation issues? -- Because slither requires the solc AST, it must have all dependencies available. +* Because slither requires the solc AST, it must have all dependencies available. If a contract has dependencies, `slither contract.sol` will fail. Instead, use `slither .` in the parent directory of `contracts/` (you should see `contracts/` when you run `ls`). If you have a `node_modules/` folder, it must be in the same directory as `contracts/`. To verify that this issue is related to slither, @@ -275,7 +274,7 @@ Slither is licensed and distributed under the AGPLv3 license. [Contact us](mailt ### Trail of Bits publication -- [Slither: A Static Analysis Framework For Smart Contracts](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19 +* [Slither: A Static Analysis Framework For Smart Contracts](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19 ### External publications diff --git a/setup.py b/setup.py index e7019b1aac..182b91d35b 100644 --- a/setup.py +++ b/setup.py @@ -8,14 +8,14 @@ description="Slither is a Solidity static analysis framework written in Python 3.", url="https://github.com/crytic/slither", author="Trail of Bits", - version="0.9.5", + version="0.9.6", packages=find_packages(), python_requires=">=3.8", install_requires=[ "packaging", "prettytable>=3.3.0", "pycryptodome>=3.4.6", - "crytic-compile>=0.3.2,<0.4.0", + "crytic-compile>=0.3.3,<0.4.0", # "crytic-compile@git+https://github.com/crytic/crytic-compile.git@dev#egg=crytic-compile", "web3>=6.0.0", "eth-abi>=4.0.0", @@ -36,7 +36,6 @@ "coverage[toml]", "filelock", "pytest-insta", - "solc-select>=1.0.4", ], "doc": [ "pdoc", From 97f817712fbe35d5d118cf1caa54075f9d660528 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:35:07 +0000 Subject: [PATCH 06/19] Bump actions/upload-pages-artifact from 1 to 2 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 1 to 2. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](https://github.com/actions/upload-pages-artifact/compare/v1...v2) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f6d66aa0a0..625cafe4f0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,7 +37,7 @@ jobs: - run: pip install -e ".[doc]" - run: pdoc -o html/ slither '!slither.tools' #TODO fix import errors on pdoc run - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: # Upload the doc path: './html/' From 65aaafa0c61f1b5dd8c8ce15e945bae3eebf12c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:38:31 +0000 Subject: [PATCH 07/19] Bump pypa/gh-action-pypi-publish from 1.8.7 to 1.8.8 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.7 to 1.8.8. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.7...v1.8.8) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f7d9ff9e7b..24f04ee87b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,7 +44,7 @@ jobs: path: dist/ - name: publish - uses: pypa/gh-action-pypi-publish@v1.8.7 + uses: pypa/gh-action-pypi-publish@v1.8.8 - name: sign uses: sigstore/gh-action-sigstore-python@v1.2.3 From 60a67680b06ec21311158a115f4d4a7d97a678cc Mon Sep 17 00:00:00 2001 From: Simone Date: Tue, 18 Jul 2023 14:07:51 +0200 Subject: [PATCH 08/19] Compile after the test was added --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5cf02136bd..ae7951c7f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,8 +96,8 @@ For each new detector, at least one regression tests must be present. #### Adding parsing tests 1. Create a test in `tests/e2e/solc_parsing/` -2. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git. -3. Update `ALL_TESTS` in `tests/e2e/solc_parsing/test_ast_parsing.py`. +2. Update `ALL_TESTS` in `tests/e2e/solc_parsing/test_ast_parsing.py`. +3. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --compile`. This will compile the artifact in `tests/e2e/solc_parsing/compile`. Add the compiled artifact to git. 4. Run `python tests/e2e/solc_parsing/test_ast_parsing.py --generate`. This will generate the json artifacts in `tests/e2e/solc_parsing/expected_json`. Add the generated files to git. 5. Run `pytest tests/e2e/solc_parsing/test_ast_parsing.py` and check that everything worked. From c47fa62b712af745cecbb0f20329d567c24affff Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Fri, 28 Jul 2023 17:36:04 -0500 Subject: [PATCH 09/19] ci: add problem matchers for yamllint and pylint --- .github/workflows/linter.yml | 7 +++--- .github/workflows/matchers/pylint.json | 32 ++++++++++++++++++++++++ .github/workflows/matchers/yamllint.json | 22 ++++++++++++++++ .github/workflows/pylint.yml | 6 +++++ 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/matchers/pylint.json create mode 100644 .github/workflows/matchers/yamllint.json diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b352a8301d..0468b07f8a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -9,8 +9,6 @@ defaults: on: pull_request: branches: [master, dev] - paths: - - "**/*.py" schedule: # run CI every day even if no PRs/merges occur @@ -42,6 +40,10 @@ jobs: mkdir -p .github/linters cp pyproject.toml .github/linters + - name: Register yamllint problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/yamllint.json" + - name: Lint everything else uses: super-linter/super-linter/slim@v4.9.2 if: always() @@ -55,7 +57,6 @@ jobs: VALIDATE_PYTHON_PYLINT: false VALIDATE_PYTHON_BLACK: false VALIDATE_PYTHON_ISORT: false - # Always false VALIDATE_JSON: false VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_PYTHON_FLAKE8: false diff --git a/.github/workflows/matchers/pylint.json b/.github/workflows/matchers/pylint.json new file mode 100644 index 0000000000..4d9e13fca7 --- /dev/null +++ b/.github/workflows/matchers/pylint.json @@ -0,0 +1,32 @@ +{ + "problemMatcher": [ + { + "owner": "pylint-error", + "severity": "error", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + }, + { + "owner": "pylint-warning", + "severity": "warning", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/workflows/matchers/yamllint.json b/.github/workflows/matchers/yamllint.json new file mode 100644 index 0000000000..b0b2f125c6 --- /dev/null +++ b/.github/workflows/matchers/yamllint.json @@ -0,0 +1,22 @@ +{ + "problemMatcher": [ + { + "owner": "yamllint", + "pattern": [ + { + "regexp": "^(.*\\.ya?ml)$", + "file": 1 + }, + { + "regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + } + ] + } \ No newline at end of file diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 207f98eac0..8c7e7bce93 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -9,6 +9,8 @@ defaults: on: pull_request: branches: [master, dev] + paths: + - "**/*.py" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -36,6 +38,10 @@ jobs: mkdir -p .github/linters cp pyproject.toml .github/linters + - name: Register pylint problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/pylint.json" + - name: Pylint uses: super-linter/super-linter/slim@v4.9.2 if: always() From d90505826f952526f5daccd107b4100ed44ab2cb Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Thu, 3 Aug 2023 16:51:49 -0500 Subject: [PATCH 10/19] fix ternary rewrite test and make assertion more strict (#2067) --- .../unit/slithir/test_ternary_expressions.py | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/tests/unit/slithir/test_ternary_expressions.py b/tests/unit/slithir/test_ternary_expressions.py index 0acd9345d7..712c9582b0 100644 --- a/tests/unit/slithir/test_ternary_expressions.py +++ b/tests/unit/slithir/test_ternary_expressions.py @@ -1,8 +1,13 @@ from pathlib import Path from slither import Slither from slither.core.cfg.node import NodeType -from slither.slithir.operations import Assignment -from slither.core.expressions import AssignmentOperation, TupleExpression +from slither.slithir.operations import Assignment, Unpack +from slither.core.expressions import ( + AssignmentOperation, + TupleExpression, + NewElementaryType, + CallExpression, +) TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" @@ -12,27 +17,29 @@ def test_ternary_conversions(solc_binary_path) -> None: solc_path = solc_binary_path("0.8.0") slither = Slither(Path(TEST_DATA_DIR, "ternary_expressions.sol").as_posix(), solc=solc_path) for contract in slither.contracts: - for function in contract.functions: - vars_declared = 0 - vars_assigned = 0 - for node in function.nodes: - if node.type in [NodeType.IF, NodeType.IFLOOP]: + if not contract.is_signature_only: + for function in contract.functions: + vars_declared = 0 + vars_assigned = 0 + for node in function.nodes: + if node.type in [NodeType.IF, NodeType.IFLOOP]: - # Iterate over true and false son - for inner_node in node.sons: - # Count all variables declared - expression = inner_node.expression - if isinstance(expression, AssignmentOperation): - var_expr = expression.expression_left - # Only tuples declare more than one var - if isinstance(var_expr, TupleExpression): - vars_declared += len(var_expr.expressions) - else: - vars_declared += 1 + # Iterate over true and false son + for inner_node in node.sons: + # Count all variables declared + expression = inner_node.expression + if isinstance( + expression, (AssignmentOperation, NewElementaryType, CallExpression) + ): + var_expr = expression.expression_left + # Only tuples declare more than one var + if isinstance(var_expr, TupleExpression): + vars_declared += len(var_expr.expressions) + else: + vars_declared += 1 - for ir in inner_node.irs: - # Count all variables defined - if isinstance(ir, Assignment): - vars_assigned += 1 - - assert vars_declared == vars_assigned + for ir in inner_node.irs: + # Count all variables defined + if isinstance(ir, (Assignment, Unpack)): + vars_assigned += 1 + assert vars_declared == vars_assigned and vars_assigned != 0 From e0098907c998fede544525f859f917074a752e63 Mon Sep 17 00:00:00 2001 From: Simone <79767264+smonicas@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:53:09 +0200 Subject: [PATCH 11/19] Add CustomError as printable output (#2063) --- slither/core/declarations/__init__.py | 2 ++ .../declarations/custom_error_contract.py | 4 +++ .../declarations/custom_error_top_level.py | 4 +++ slither/utils/output.py | 29 +++++++++++++++++++ 4 files changed, 39 insertions(+) diff --git a/slither/core/declarations/__init__.py b/slither/core/declarations/__init__.py index 92e0b9eca3..f341187518 100644 --- a/slither/core/declarations/__init__.py +++ b/slither/core/declarations/__init__.py @@ -18,3 +18,5 @@ from .function_contract import FunctionContract from .function_top_level import FunctionTopLevel from .custom_error_contract import CustomErrorContract +from .custom_error_top_level import CustomErrorTopLevel +from .custom_error import CustomError diff --git a/slither/core/declarations/custom_error_contract.py b/slither/core/declarations/custom_error_contract.py index cd279a3a62..2c8bec9efa 100644 --- a/slither/core/declarations/custom_error_contract.py +++ b/slither/core/declarations/custom_error_contract.py @@ -16,3 +16,7 @@ def is_declared_by(self, contract: "Contract") -> bool: :return: """ return self.contract == contract + + @property + def canonical_name(self) -> str: + return self.contract.name + "." + self.full_name diff --git a/slither/core/declarations/custom_error_top_level.py b/slither/core/declarations/custom_error_top_level.py index 64a6a85353..b80356b245 100644 --- a/slither/core/declarations/custom_error_top_level.py +++ b/slither/core/declarations/custom_error_top_level.py @@ -12,3 +12,7 @@ class CustomErrorTopLevel(CustomError, TopLevel): def __init__(self, compilation_unit: "SlitherCompilationUnit", scope: "FileScope") -> None: super().__init__(compilation_unit) self.file_scope: "FileScope" = scope + + @property + def canonical_name(self) -> str: + return self.full_name diff --git a/slither/utils/output.py b/slither/utils/output.py index 84c9ac65a1..4a91ca9b9b 100644 --- a/slither/utils/output.py +++ b/slither/utils/output.py @@ -18,6 +18,7 @@ Structure, Pragma, FunctionContract, + CustomError, ) from slither.core.source_mapping.source_mapping import SourceMapping from slither.core.variables.local_variable import LocalVariable @@ -438,6 +439,8 @@ def add(self, add: SupportedOutput, additional_fields: Optional[Dict] = None) -> self.add_event(add, additional_fields=additional_fields) elif isinstance(add, Structure): self.add_struct(add, additional_fields=additional_fields) + elif isinstance(add, CustomError): + self.add_custom_error(add, additional_fields=additional_fields) elif isinstance(add, Pragma): self.add_pragma(add, additional_fields=additional_fields) elif isinstance(add, Node): @@ -585,6 +588,32 @@ def add_event(self, event: Event, additional_fields: Optional[Dict] = None) -> N self._data["elements"].append(element) + # endregion + ################################################################################### + ################################################################################### + # region CustomError + ################################################################################### + ################################################################################### + + def add_custom_error( + self, custom_error: CustomError, additional_fields: Optional[Dict] = None + ) -> None: + if additional_fields is None: + additional_fields = {} + type_specific_fields = { + "parent": _create_parent_element(custom_error), + "signature": custom_error.full_name, + } + element = _create_base_element( + "custom_error", + custom_error.name, + custom_error.source_mapping.to_json(), + type_specific_fields, + additional_fields, + ) + + self._data["elements"].append(element) + # endregion ################################################################################### ################################################################################### From d86bd4109d69f7e99ea84e716f7d41d9ac29b1ea Mon Sep 17 00:00:00 2001 From: SheldonHolmgren <116484297+SheldonHolmgren@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:54:15 +0100 Subject: [PATCH 12/19] UnaryOperation: -variable and +variable doesn't make variable an lvalue (#2027) --- slither/core/expressions/unary_operation.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/slither/core/expressions/unary_operation.py b/slither/core/expressions/unary_operation.py index 6572249278..4051326131 100644 --- a/slither/core/expressions/unary_operation.py +++ b/slither/core/expressions/unary_operation.py @@ -106,8 +106,6 @@ def __init__( UnaryOperationType.MINUSMINUS_PRE, UnaryOperationType.PLUSPLUS_POST, UnaryOperationType.MINUSMINUS_POST, - UnaryOperationType.PLUS_PRE, - UnaryOperationType.MINUS_PRE, ]: expression.set_lvalue() From 3f90e86badfa956b5cc692e0421c2b8065c31d43 Mon Sep 17 00:00:00 2001 From: yisun92 Date: Thu, 3 Aug 2023 17:56:04 -0400 Subject: [PATCH 13/19] fix: get_state_variable_from_canonical_name() filter by canonical_name (#1983) --- slither/core/declarations/contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index fd2cdd4684..9b1488db31 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -861,7 +861,7 @@ def get_state_variable_from_canonical_name( Returns: StateVariable """ - return next((v for v in self.state_variables if v.name == canonical_name), None) + return next((v for v in self.state_variables if v.canonical_name == canonical_name), None) def get_structure_from_name(self, structure_name: str) -> Optional["StructureContract"]: """ From 4b0482014dbf911f886a5f1221260ccb71a7cd22 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 8 Aug 2023 10:01:12 -0500 Subject: [PATCH 14/19] chore: bump sigstore to 2.0.0 (#2081) --- .github/workflows/publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 24f04ee87b..977a92ab21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,8 +47,7 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.8.8 - name: sign - uses: sigstore/gh-action-sigstore-python@v1.2.3 + uses: sigstore/gh-action-sigstore-python@v2.0.0 with: inputs: ./dist/*.tar.gz ./dist/*.whl release-signing-artifacts: true - bundle-only: true From 2bc6a0f1a4349e2cb6a45bf7a078f65e050d7e28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:22:08 +0000 Subject: [PATCH 15/19] Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.8 to 1.8.10. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.8...v1.8.10) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 977a92ab21..ed11178e37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,7 +44,7 @@ jobs: path: dist/ - name: publish - uses: pypa/gh-action-pypi-publish@v1.8.8 + uses: pypa/gh-action-pypi-publish@v1.8.10 - name: sign uses: sigstore/gh-action-sigstore-python@v2.0.0 From 81c0c8cd88a437f39fa6aece06470f7e8c1b1a31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:22:13 +0000 Subject: [PATCH 16/19] Bump sigstore/gh-action-sigstore-python from 2.0.0 to 2.0.1 Bumps [sigstore/gh-action-sigstore-python](https://github.com/sigstore/gh-action-sigstore-python) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/sigstore/gh-action-sigstore-python/releases) - [Commits](https://github.com/sigstore/gh-action-sigstore-python/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: sigstore/gh-action-sigstore-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 977a92ab21..cd6feacceb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,7 +47,7 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.8.8 - name: sign - uses: sigstore/gh-action-sigstore-python@v2.0.0 + uses: sigstore/gh-action-sigstore-python@v2.0.1 with: inputs: ./dist/*.tar.gz ./dist/*.whl release-signing-artifacts: true From ff52901e6d1240fcd6633e5cee59577226adde66 Mon Sep 17 00:00:00 2001 From: joodiewoodo <38355190+dokzai@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:03:56 -0400 Subject: [PATCH 17/19] Allow underscore in variable naming convention for internal state variables (#2110) * fix: allow underscore in variable naming convention for internal state variables and update test_detector tests snapshot * change set visibility of _myPublic to public, update test snapshots --- .../naming_convention/naming_convention.py | 2 +- ...ention_0_4_25_naming_convention_sol__0.txt | 14 +++++++------- ...ention_0_5_16_naming_convention_sol__0.txt | 14 +++++++------- ...ention_0_6_11_naming_convention_sol__0.txt | 14 +++++++------- ...vention_0_7_6_naming_convention_sol__0.txt | 14 +++++++------- .../0.4.25/naming_convention.sol | 3 ++- .../0.4.25/naming_convention.sol-0.4.25.zip | Bin 3545 -> 3659 bytes ...arning_for_public_constants.sol-0.4.25.zip | Bin 1377 -> 1380 bytes .../0.5.16/naming_convention.sol | 3 ++- .../0.5.16/naming_convention.sol-0.5.16.zip | Bin 3563 -> 3671 bytes ...arning_for_public_constants.sol-0.5.16.zip | Bin 1382 -> 1387 bytes .../0.6.11/naming_convention.sol | 3 ++- .../0.6.11/naming_convention.sol-0.6.11.zip | Bin 3566 -> 3688 bytes ...arning_for_public_constants.sol-0.6.11.zip | Bin 1402 -> 1409 bytes .../0.7.6/naming_convention.sol | 3 ++- .../0.7.6/naming_convention.sol-0.7.6.zip | Bin 3481 -> 3605 bytes ...warning_for_public_constants.sol-0.7.6.zip | Bin 1357 -> 1367 bytes 17 files changed, 37 insertions(+), 33 deletions(-) diff --git a/slither/detectors/naming_convention/naming_convention.py b/slither/detectors/naming_convention/naming_convention.py index 02deb719e7..0633799e56 100644 --- a/slither/detectors/naming_convention/naming_convention.py +++ b/slither/detectors/naming_convention/naming_convention.py @@ -167,7 +167,7 @@ def _detect(self) -> List[Output]: results.append(res) else: - if var.visibility == "private": + if var.visibility in ["private", "internal"]: correct_naming = self.is_mixed_case_with_underscore(var.name) else: correct_naming = self.is_mixed_case(var.name) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt index ed4177ca17..e4a643678d 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_4_25_naming_convention_sol__0.txt @@ -1,10 +1,10 @@ Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#70) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#70) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase @@ -14,11 +14,11 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_c Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#60) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#57) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#69) is single letter l, O, or I, which should not be used Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords @@ -26,7 +26,7 @@ Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.4.25 Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#68) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt index 35c11193f5..96f6aab3c6 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_5_16_naming_convention_sol__0.txt @@ -1,10 +1,10 @@ Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#70) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#70) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase @@ -14,11 +14,11 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_c Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#60) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#57) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#69) is single letter l, O, or I, which should not be used Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords @@ -26,7 +26,7 @@ Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.5.16 Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#68) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt index f692e211b8..f1986fb781 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_6_11_naming_convention_sol__0.txt @@ -1,10 +1,10 @@ Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#70) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#70) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase @@ -14,11 +14,11 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_c Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#60) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#57) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#69) is single letter l, O, or I, which should not be used Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords @@ -26,7 +26,7 @@ Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.6.11 Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#68) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt index af17cabe8f..b471cbfa2f 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_NamingConvention_0_7_6_naming_convention_sol__0.txt @@ -1,10 +1,10 @@ Struct naming.test (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#14-16) is not in CapWords -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is not in mixedCase +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#70) is not in mixedCase -Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is single letter l, O, or I, which should not be used +Variable T.I (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#70) is single letter l, O, or I, which should not be used -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#68) is not in mixedCase +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is not in mixedCase Variable naming.Var_One (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase @@ -14,11 +14,11 @@ Contract naming (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_co Enum naming.numbers (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords -Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase +Parameter T.test(uint256,uint256)._used (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#60) is not in mixedCase -Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase +Variable T._myPublicVar (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#57) is not in mixedCase -Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#68) is single letter l, O, or I, which should not be used +Variable T.O (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#69) is single letter l, O, or I, which should not be used Event naming.event_(uint256) (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords @@ -26,7 +26,7 @@ Modifier naming.CantDo() (tests/e2e/detectors/test_data/naming-convention/0.7.6/ Function naming.GetOne() (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase -Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#67) is single letter l, O, or I, which should not be used +Variable T.l (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#68) is single letter l, O, or I, which should not be used Parameter naming.setInt(uint256,uint256).Number2 (tests/e2e/detectors/test_data/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase diff --git a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol index 7181ca9110..add7867e07 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol @@ -53,7 +53,8 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; + uint internal _myInternalVar; + uint public _myPublicVar; function test(uint _unused, uint _used) public returns(uint){ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip b/tests/e2e/detectors/test_data/naming-convention/0.4.25/naming_convention.sol-0.4.25.zip index c7aaae071dbf8633c6c3ccd451a16b70b9ddd938..fe35f0c006f2a1526c143d8def79ef54a25e15c3 100644 GIT binary patch delta 3541 zcmV;`4Jz{48_OIRP)h>@KL7#%4ghDFCs&x_8Zws+0078)kr+~cO_*8QcqqqPRb~nJ zWXL2H807psVK9!fD&p|6=0Ku$knG4&vYB3y^^P$vjeL2gg{xK7S*Ww=&2KqVd1^B5 zw`_`>>&EzD8*b())Mt(31r;v^pjrj-TBpUNY%cWUo9uJ#)=3m3%@AW^TQrWvcUZkuOLMs*Tw_uAix;faD?v<{$vOk{3KfzsPSRdp zYypUIniJylkiZV4!v`MKQc&J`UoMiVr{=K=D%+ndCNJvghWGV|#|obcTUNJC58V0b zv%=E>zBu83@E-7a2li!cE5F+>`_H*wgjT|4SZ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g^+p1%E(6#2@2SGuf#G*EtMvY71%88)U_94)8q`L1n2WwFbBQ0JgY;tzor&kp*FDu!7*T7?c z*eS}vtVfz>8`c_t#XW+CfzT1Cz@tW!|2>m%I1B4oA967CIZsJn}dWRXBBScrs@=)$pqKd#otR`Z3 zZ@QhZFos-zm_8d}d%dh=P<$~>uAD}tzR2570_w!3(mog)Nx}e4>WqUWta!0gL_(!g zIz+htNMnk;EM3uVu%`@4Wl4k8Cd(f3r@CEC7%>xh3B5>B*_tEBzrUv5xOps6xnod` z`YF6HG5t%=QfVi8I?bUBM~Wm?CBeAecP`bQgr=6%0Bc zlJ4c)2>Y(SE^7_|SzsCiV#n_ht&NwXb{2Pj=%60BflD8Fej7gpPI%?)n~TN4(daN6 z4zYKwIdj&Fu5+4r9hE2Afu`;+{Z#$eN3{CQ$)L^&&z}2458;)rc;&S|Ijo#t5GIbO zJ*7r}vZ9j({aKqFS0|jg^%)`c*a*YjrirO`6JUCMC&8hK#W@nK_RpDM2zDf<>Ywb{f3)ssgt31R4;sIOeZJ-v|eEeE4n>XIf!!klPCTKQ=;sQYhgKK52keTo^;HjqE8tF*Rvl2+@!H8Xh z(|!y0yD*(o;HHp|u_1gapsr3VppxjVw!Xe`HARRJ%x_A3 z$y8nZ5qI@AdY<<;-a2uQQ62em`ANZl0Y(pLW-`%1f(L}ZJ`!;oTJyTYST2YTMmnS! zA{*-Dg}hMP7dpGc4IssR6$SO#I@h$K{RN$x)&5hLE?-%55giQd-)`Eis|A_`^ukVZ z71zQH|1ONa405FY8Gynhq diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol index 7181ca9110..add7867e07 100644 --- a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol +++ b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol @@ -53,7 +53,8 @@ contract Test { contract T { uint private _myPrivateVar; - uint _myPublicVar; + uint internal _myInternalVar; + uint public _myPublicVar; function test(uint _unused, uint _used) public returns(uint){ diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip b/tests/e2e/detectors/test_data/naming-convention/0.6.11/naming_convention.sol-0.6.11.zip index 3e6277ac1b0975ae85638b853cbde20646ccd7d2..b91697087411d7fed7effcb98875fdbf53f7a74f 100644 GIT binary patch delta 3577 zcmVY=8|WMxP)h>@KL7#%4ghGGCs)c;ElIQu008}d001eItPL!YMW(oLY$RrgQ3gjxjEce0ipYt5wxm*A4hV zaasQ-khEno{$)XiH|JKPSg6-e zrCRjE^9QjLI)m6P-$jc8Mv8Vi7+z#p%s`^_kVeojN>@u;afeXnwb?|oB(_)i<=^%8<60JX#Am$u zLwO)M^?FN2vsx5!p=PImGTR+DhP#W7jlM59aULPVB)h%BXcP?4f_TQK?f)_IHYeQV%q& z(G8wBplSx73dE5ha%!uTi_-Fc?~>PEC4LI`SJAs~7$yW4s$W&_%G_*2BiMQH*J-)0 zIy)f6!{%u+uxo*_U|k0*n1rnxVlLv(d4nzUWal97J1YbJZW1xyNkF9bAN;)%ihSB||2Y`op5j zYAHzAuL>5e9(yG;&)=c$x=I~ziW)Bo{`bczClUFChfON&o=}msH=kz9PwS_J^|S|{ z>*I4y@#H&7V|jf7QCrWXb8Yp3&{6+e;m$R3<+Troz3YuRT@N`$u1N-(e1{CufKx z`X7J#h8EkCWBMMC-7-?2-I8h5L}8eT12Z|B_)u=`2-;Isz*I3txxNSLhN5s*cPr7!zMz8(ymNC}UJ+Ah(q{JtaL_9{fiH%)w zT%Dr|3KNh%30?MCQ@7MPbBg$fI$oBM=J|h%j$o?S>g);0(ZSddb(ijgVTJu}-e?8d zZbSRU>L%Df8ldX&09WRoUUmMJjyHEBPIPynz-T`ziSu`pfAP8m{{n;q)0j_Vu+VaTyS8SQkHty7wEral~#m*Tv*>jzXJ%oepJh z{)8AA!r?OaXfvZ-k^lR&z;7iFTugsRUsvgmj8^W_YnPCr>o44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r%vhx^#flM`pbiLZYw%V1IysX1v5S0-Tpg znC1^{bGO7#=YRspLMwz1tGW3+7is3UloK9&0j)0v-Pb4*wbq52+QJ); z6H)?^i6pc-{dpVRnrpv*ll2D2P<|5uutQSXz`_i4k41hvL;Bo(n;dG?L(d&`P!@~xv6y8yhZfX7Kbz-d&b_f)+ z>*`t2yMjMv{W(l|1}J>{7a!GJ6Y>#}i)Wkv*-gmA;S-o8L8ekm6|g}26A%XYb*D!i zl_5Fvmr^5Rh9H-`D=QEWTeT+nGfbwaPpjvy>Toqe|JJYz#!yQE0zU&k00ICG06L9# ZR_r<*r#cM)0BC)a6%I`Xfeiov0078)u@wLS diff --git a/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip b/tests/e2e/detectors/test_data/naming-convention/0.6.11/no_warning_for_public_constants.sol-0.6.11.zip index 67f8eff7ee737a57bf2ee1036db7d482c4926445..ed813d07b9be8e890dcdba4f865b432c1a77860b 100644 GIT binary patch delta 1245 zcmV<31S0$T3V{n4P)h>@KL7#%4ghJHCs+1C%$%_V006iTkr-fqO_*8QcqqqPRb~nJ zWXL2H807psVK9!fD&p|6=0Ku$knG4&vYB3y^^P$vjeL2gg{xK7S=SBtKOl888a$}y z?7meBGBj`~m&-#p=E9&=Y#IZ!d=kIw6mvH2#t-Bf3L+x|hA9LYtG{(*ZO9he`Pt%@ z99+AjzSX&+R+e}~Xj(A3cl383y=mPAtt?kF!S3%I z%x>Iof-%-1gqi30R7jx=7s^%4s@M{t*PZ_xP0M7F4PG z$!m5QoXiRjj)H&uA{a$6bX|c_&6y`Ox#Tc{!Qd|)H#t~;eF>ONb4~ju`Zz&?pRDj8i|yex+5G`u4?t)Lpd~j9^S}rh9Cp#k;jGJ=b_f z_)qqQ?E!RuMDQ$$Wj=608lsSFpFu*}Cmk+?qv~{lu>s>ST}?DCvf{ns3R&${S;Opk zaI50}CpU47&(DSJMXyygN@c`0&}jO~HN|7%tOPX5Xj{=caw1q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93kF2rP<3@gOW2VSo8us5NAHs8;j5 zH2A8&cvM!1skW-NBjE5oH1DO928u13v%)01f~;jdxa&pY~DZ3;+P!b^rh=000000001!%nd^ZEDZnv004Oc Bn=b$W diff --git a/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip b/tests/e2e/detectors/test_data/naming-convention/0.7.6/no_warning_for_public_constants.sol-0.7.6.zip index 7b304b5c0c51361e8d7eb38abb0c614fcc9b6015..9f2c1a1a7d5a108a3277c3cdde3a8e3958a51c5d 100644 GIT binary patch delta 1210 zcmV;r1V#JJ3fBr7P)h>@KL7#%4ghJHCs#WZb_|CE002S{001|W{RBFZRU>~*m|5C* zD92k>W(oLY$RrgQ3gjxjEce0ipYt5wxm?mMg1 z!?aES#YRK*y$&n>uC}UR(=!r7N~MGhMaQF&CtYP=swZ=xV(;-?C)ok`oa6^%<{q}9 zP1E2tL&?33pTFiG9aPi!NlJeN;~-U1_3Xxy;Q=5dfq7MNZmxntGvFysyGS4jq8GQbT$C;ac%IIn^W51f+T>z{X}0 zMbwD*2^_!yJ?!-W2&iy3y#Zox(S+HZ!fAM|BJdCoaom6xSFsWEw?BW$W+Z4$y4dDV zujTrnr}Rf7tWuhG9c$O{ccThSHO$`0Ke(L&dp7=<)MEFJBTPE4BLW!Tw4W; z!)qdAj-o|9rOVTcO3~(j`lx+q0PRdocTr#Hy@)QU+7$bA`o%Awa5(FnpNsrrFuhyt$CWCv zVv+M$dg{x)yBU8zG85pE@w48F-}y;?Yt_7M*LCv}T0YHqh%RHqOHp-CV7AVG642)X zqW!`dtQHIkx4o+Loj8=RzTal$o1*Uen{#i9YmE#eA7I=qOXpRkO|NwmM9xQ(^L5o{Ml?U)J4?+&K&42j z1!J)8I_=DF6S50Xlk6O928u06zc%01g0YnI~5} Y6m|y;hXeosLJyPd1X~8&1ONa40C4q9J^%m! delta 1195 zcmV;c1XTOi3e5@_P)h>@KL7#%4gfoicUC(~IvITg002D^kr-fqJ|EX}y%sU?M-PRi zm0nlZdjJq|?-l5q5W}VAK!X$~yhYNz{x3$S;g((ndY>|}t(Qr6=UkA>bk%pZW|Xyk zrQe*weOeB`)1lL#N+Lu>=!z=sQlS87o3+&huXYgLmwM+m3uP)To~Hn zL@5p8M8E0G-izgbkV^<^EJ&Bdy>q@3k5lY(P;?^K+u39yKr$~9q%p%E<7|9U9=e%1 znE=A7qeF=B!WF2b_=b%V6mKS701A(sQ|0>pC2ohLaAEO@SC%p3GA}1*?YF}wCV@>i zVx$qli}G^$P?gpI2BC ztFxNQgyU1chQb@n>%uM@I2veB^Qdl7bgpFO=57sw3Hg%DO;I!J25Aypkzd_5f9qTg zljpR6@j(amrZ1S^O4&Vk)FF|l?@D_xt>Bf*ctae^08V?8YRSo<)vK!X6MVZ4v+!hE ze|L7=ZR5ays2dYNOXbH7{5ui~ID-U|Fl+L68*f-s(}((dFK#DLlO`C}!AuP(haP5CRbj5S>X+9d+&VH`LpnKEsG7b7jQ5$^P%c<)gl52 zve}2r{en?{Vi5Wd_a9a2q+?&2E)a_gixd>OV?%R5938z!K0&agXiaUM*T^|GKp9h0 zq6fr(DL{O;>|$fDOj4JcV*(UH$2Z(p$~^-4)D?bY!IPruOR8{x>9d$YJnIFIYsd1M296&xdvxpTCmHnv z-%#A?dPY5=0nj}mcXv@}W z#yKuZrqNkkcK`4YWgOjj8!hpVNtt!Jhd8G(5(Y)zaJOZvhqhM-h5P3wwv|`uq-cD9 zaY)D83{b{@g+&hl#o7E)tyzkYA{*YBBa*olsTr|PFje)qwL#0da5gSZZ%8fXWm)FAe=yt;5 z`yF~RpTc#Qs@qD=!=xYaE3Pp!xf$tyiL^fF9Qaw166x4#tB=Nl#~KCejk)0 Date: Fri, 8 Sep 2023 05:16:54 +0200 Subject: [PATCH 18/19] Make the results deterministic (#2114) --- slither/detectors/statements/divide_before_multiply.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slither/detectors/statements/divide_before_multiply.py b/slither/detectors/statements/divide_before_multiply.py index 6f199db414..334da592c0 100644 --- a/slither/detectors/statements/divide_before_multiply.py +++ b/slither/detectors/statements/divide_before_multiply.py @@ -2,7 +2,7 @@ Module detecting possible loss of precision due to divide before multiple """ from collections import defaultdict -from typing import DefaultDict, List, Set, Tuple +from typing import DefaultDict, List, Tuple from slither.core.cfg.node import Node from slither.core.declarations.contract import Contract @@ -63,7 +63,7 @@ def is_assert(node: Node) -> bool: # pylint: disable=too-many-branches def _explore( - to_explore: Set[Node], f_results: List[List[Node]], divisions: DefaultDict[LVALUE, List[Node]] + to_explore: List[Node], f_results: List[List[Node]], divisions: DefaultDict[LVALUE, List[Node]] ) -> None: explored = set() while to_explore: # pylint: disable=too-many-nested-blocks @@ -114,7 +114,7 @@ def _explore( f_results.append(node_results) for son in node.sons: - to_explore.add(son) + to_explore.append(son) def detect_divide_before_multiply( @@ -145,7 +145,7 @@ def detect_divide_before_multiply( # track all the division results (and the assignment of the division results) divisions: DefaultDict[LVALUE, List[Node]] = defaultdict(list) - _explore({function.entry_point}, f_results, divisions) + _explore([function.entry_point], f_results, divisions) for f_result in f_results: results.append((function, f_result)) From 9da51fff3b5b16c04f44370fddcfe1aba48edd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <2642849+elopez@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:32:32 -0300 Subject: [PATCH 19/19] detectors: cache_array_length: include source mapping in finding (#2076) * detectors: cache_array_length: include source mapping in finding The detector was manually string-interpolating the code and line information, which left the finding without source mapping metadata and broke filtering. Include the node directly on the finding info so that the metadata is preserved. --------- Co-authored-by: alpharush <0xalpharush@protonmail.com> --- .../operations/cache_array_length.py | 5 ++--- ...yLength_0_8_17_CacheArrayLength_sol__0.txt | 20 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/slither/detectors/operations/cache_array_length.py b/slither/detectors/operations/cache_array_length.py index e4d8cf2c69..59289ed0f7 100644 --- a/slither/detectors/operations/cache_array_length.py +++ b/slither/detectors/operations/cache_array_length.py @@ -216,9 +216,8 @@ def _detect(self): for usage in non_optimal_array_len_usages: info = [ "Loop condition ", - f"`{usage.source_mapping.content}` ", - f"({usage.source_mapping}) ", - "should use cached array length instead of referencing `length` member " + usage, + " should use cached array length instead of referencing `length` member " "of the storage array.\n ", ] res = self.generate_result(info) diff --git a/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt index 456c702a58..c2a5023a6f 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_CacheArrayLength_0_8_17_CacheArrayLength_sol__0.txt @@ -1,20 +1,20 @@ -Loop condition `j < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#109) should use cached array length instead of referencing `length` member of the storage array. +Loop condition k_scope_17 < array2.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#133) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#161) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i_scope_23 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#172) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#172) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#37) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `j < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#126) should use cached array length instead of referencing `length` member of the storage array. +Loop condition j_scope_11 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#109) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `k < array2.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#133) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i_scope_4 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#68) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#68) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i_scope_22 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#167) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `k < array2.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#99) should use cached array length instead of referencing `length` member of the storage array. +Loop condition k_scope_9 < array2.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#99) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#167) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i_scope_6 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#80) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#37) should use cached array length instead of referencing `length` member of the storage array. +Loop condition j_scope_15 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#126) should use cached array length instead of referencing `length` member of the storage array. -Loop condition `i < array.length` (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#80) should use cached array length instead of referencing `length` member of the storage array. +Loop condition i_scope_21 < array.length (tests/e2e/detectors/test_data/cache-array-length/0.8.17/CacheArrayLength.sol#161) should use cached array length instead of referencing `length` member of the storage array.