Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: InspexAuditor
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 64.5 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Inspex Slither Plugin

This is a collection of slither custom plugins developed by Inspex team. The plugins also come with utilities that should help the detection and reporting easier.

Installation

Integrate into Slither

The plugins are built from official Slither's plugin template. The installer will attempt to install the plugin into current python environment, which could have an error about the installer trying to write files without the permission. We strongly suggest you installing the plugins in a virtual environment.

The official Slither's repository has already come with a virtual environment. You can use it to create a virtual environment solely for plugin-installed slither.

Use Slither's env bash git clone https://github.com/crytic/slither.git cd slither make dev source env/bin/activate

Install the plugins bash cd inspex-plugins python setup.py develop

Docker

You can use Dockerfile to build a docker image for running slither with our plugins.

```bash

Create a new image from the Dockerfile file

docker build -t {image tag name} .

Example

docker build -t inspexplugins . ```

When the image has been built, you can use the tag name that you've used to run a new container from the image. You can use the -v flag to let container to access file from the host.

```bash

Create a new container from the image

docker run -it -v {local path to be mounted}:/home/slither/mnt --name {new name of the container} {tag name of the image}

Example

docker run -it -v ~/myDefiProject:/home/slither/mnt --name inspex-slither inspexplugins ```

If you have specified the name of the container, you can use that name to easily access to the container again by using the docker exec commmand.

```bash

Access to the started container

docker exec -it {the container name} /bin/bash

Example

docker exec -it inspex-slither /bin/bash ```

If the container has stopped, you can start it again by using the docker start command. ```bash

Start the container

docker start -ia {the container name}

Example

docker start -ia inspex-slither ```

Usage

You can test the installed plugins by rurnning the --list-detectors or --list-printers flags to list the installed plugin. If the plugins have been installed successfully, we should see the new plugins in the result.

List all registered detectors bash slither --list-detectors

List all registered printers bash slither --list-printers

If there is an error about the mismatch version of solidity. You can use solc-select to change the current version of solidity.

```bash

you need to run the install first

solc-select install 0.8.17

select the version by using the use sub-command

solc-select use 0.8.17 ```

Detectors

  • InsufficientLogging
    • insufficient-logging
    • Detect privilege functions that does not emit events
  • AssertStatement
    • assert-statement
    • Detect usage of assert statement in contracts
  • FloatingPragmaVersion
    • floating-pragma-version
    • Detect usage of floating pragma version
  • ModifiableOwnership
    • modifiable-ownership
    • Detect functions that can modify the contract ownership
  • AssignMemoryArray
    • assign-memory-array
    • Detect the assigning of value into a memory array, which could be unintended
  • InvokeUnknownExternalFunctions
    • unknown-external-functions
    • Detect an external call to user controllable addresses
  • ApproveUnknownAddress
    • approve-unknown-address
    • Detect an approve to user controllable addresses
  • StateChangingLoop
    • state-changing-loop
    • Detect loops that change states
  • LoopReverted
    • loop-reverted
    • Detect loops that contain require, assert, or revert statements
  • ExplicitTypeConversion
    • explicit-type-conversion
    • Detect an explicit type conversion, which could found a down-casting
  • CentralizedState
    • centralized-state
    • Detect function that has access control that can change contract's states
  • InexplicitVariableVisibility
    • inexplicit-variable-visibility
    • Detect states that does not explicitly decalre the visibility
  • StrictEqualities
    • strict-equalities
    • Detect the usage of strict-equalities on a sensitive value, e.g., balanceOf.
  • InspexExternalFunction
    • inspex-external-function
    • The overrided version of external-function for extending the printing function
  • InspexIncorrectSolc
    • inspex-solc-version
    • The overrided version of solc-version for extending the printing function
  • SelfInvocation
    • this-usage
    • Detect the usage of this to call itself
  • LoopSkip
    • loop-skip
    • Detect loops that contains return, break, or continue.
  • DirtyIterators
    • dirty-iterators
    • Detect loops the iterator can be modified in multiple places
  • UnsafeInitiate
    • unsafe-initiate
    • Detect the initialize() function that does not safe
  • StandardTokenCheck
    • common-standard-token
    • Try guessing the standard that the contract trying to implement. If imple ment correctly, it should guess correctly.

Printers

  • InspexTestingGuideChecklist
    • inspex-checklist
    • Mapping the detector into our testing guide. And show the results according to the standard checklist.
    • Please noted that the printer does not use every detector on Slither. For the best result, please use the printer with the results from every detectors.
  • InspexTestingGuideChecklistCSV
    • inspex-checklist-csv
    • Format the result from inspex-checklist into the CSV format.
  • InspexTestingGuideChecklistXLS
    • inspex-checklist-xls
    • Format the result from inspex-checklist-csv into the xlxs format.

Owner

  • Name: Inspex Auditor
  • Login: inspexAuditor
  • Kind: user

Citation (CITATION.cff)

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'

GitHub Events

Total
Last Year