Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slither-simil implementation draft #666

Draft
wants to merge 1,708 commits into
base: master
from

Conversation

@spilehchiha
Copy link
Collaborator

@spilehchiha spilehchiha commented Oct 14, 2020

This is the initial commit for the most up-to-date implementation of slither-simil. Everything client-related has been removed and public datasets in the form of train / dev / test datasets will be added in the next commit.

montyly and others added 30 commits Nov 6, 2019
Make generate_json_result generating the JSON elements automatically
Add unique ID per finding
- Shorten the list of detectors
- Add reference to Crytic
- Shorten and order printers
- Add tools description
- Add Slither academic paper
Slither printer and API for getting evm instructions for contract source
Contract summary: Show upgreadble information (fix #358) and if the contract is a most derived one
Contract: add is_upgradeable/is_upgradeable_proxy properties
Parsing: add inline assembly source code to the node
Uninitialized state variable detector: remove FP due to delegatecall proxy
Install by pip does not work in Macos
Add a reference to the crytic research prize
montyly and others added 26 commits Apr 24, 2020
Add fallback/receive as shadowed builtin
Human summary printer: Fix information incorrectly printed
  - Add utils.tests_pattern functions
  - Add contract.is_test
  - Add contract.is_token / contract.is_possible_token
  - Add pragma.is_abi_encoder_v2
- Standard library: add support for @openzepeelin/contracts package
- Improve human summary printer:
  - Use the added API
  - Use MyPrettyTable
  - Add features collumn
Add new APIs and improve human summary printer
Add support for abi.decode on array
Add better fixpoint on are_variables_written
…taset and compare input function's similarity with.
…n the last commit triggered having a new modified encode_contract function for train procedure as well.
…te through all the contract / function pairs compiled in a directory.
…ocess input files recursively, and process multiple .zip / .sol files as well.
…lient-related; public datasets to be added in the next commit.
There is a wiki page available for `slither-simil` on this [page.](https://github.com/crytic/slither/wiki/Code-Similarity-detector)


## Installation adn Setup

This comment has been minimized.

@FlashSheridan

FlashSheridan Oct 26, 2020

“adn” should presumably be “and”.


Take the `output.csv` file and the `datasets/15kdump_model.bin` file already in the repository and use it as follows:
```
slither-simil test [datasets/15kdump_model.bin] --filename [file_name; can be a singleton file name or a directory path containing multiple smart ontracts either in .sol or .zip formats or a c ombincation of both] --fname [function_name with or without the preciding contract name (as in contractname[.]functionname) or a simple dot mark, meaning all the functions in the contracts provided by the previous argument flag;] --input [cache.npz or output.csv] --ntop [n; an ineteger; e.g. 3]

This comment has been minimized.

@FlashSheridan

FlashSheridan Oct 26, 2020

  • “ontracts” should be “contracts”
  • “c ombincation” should be “combination”
  • “preciding” should be “preceding”
  • “flag;”: The semicolon is not needed, and semicolons on the command line make me nervous, even if they are supposed to be removed.
  • “ineteger” should be “integer”
@spilehchiha spilehchiha force-pushed the spilehchiha:slither-simil-draft branch from 11b39e7 to 58086f9 Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants
You can’t perform that action at this time.