#security #smart-contracts #soroban #auditor #ink #practice #detector

bin+lib cargo-scout-audit

Scout is an extensible open-source tool intended to assist Ink! and Soroban smart contract developers and auditors detect common security issues and deviations from best practices

12 releases

new 0.2.10 Apr 26, 2024
0.2.9 Apr 23, 2024
0.2.4 Mar 20, 2024
0.2.2 Jan 18, 2024
0.1.1 Jun 30, 2023

#2100 in Magic Beans

Download history 7/week @ 2024-01-18 3/week @ 2024-02-15 10/week @ 2024-02-22 3/week @ 2024-02-29 3/week @ 2024-03-07 158/week @ 2024-03-14 132/week @ 2024-03-21 36/week @ 2024-03-28 229/week @ 2024-04-04 111/week @ 2024-04-11 284/week @ 2024-04-18

662 downloads per month

MIT license

87KB
2K SLoC

Scout: Security Analysis Tool

https://img.shields.io/badge/license-MIT-green

Scout in a Dark Forest

Scout is an extensible open-source tool intended to assist ink! and Soroboan smart contract developers and auditors detect common security issues and deviations from best practices.

This tool will help developers write secure and more robust smart contracts.

Our interest in this project comes from our experience in manual auditing and our usage of comparable tools in other blockchains. To improve coverage and precision, we´ll persist in research efforts on static and dynamic analysis techniques.

Quick Start

For a quick start, make sure that Cargo is installed on your computer. Then, install Scout dependencies by running the following command:

cargo +nightly install cargo-dylint dylint-link

Afterwards, install Scout with the following command:

cargo +nightly install cargo-scout-audit

To run Scout, navigate to the root directory of any ink! or Soroban project and execute the following command:

cargo scout-audit

For more information on Scout's installation and usage, please refer to Scout's documentation for ink! or Soroban.

Tests

To validate our tool, we provide a set of code examples located in the test-cases folder.

In order to run the integration tests, navigate to apps/cargo-scout-audit and run:

cargo test --all --all-features

In order to run the tests for a particular test-case, run the same command on that particular test-case folder (e.g: test-cases/delegate-call/delegate-call-1/vulnerable-example).

Detectors

Detectors available for Scout are the ones available for Scout in its ink! and Soroban versions.

Acknowledgements

Scout is an open source vulnerability analyzer developed by CoinFabrik's Research and Development team.

We received support through grants from both the Web3 Foundation Grants Program, the Aleph Zero Ecosystem Funding Program and the Stellar Community Fund.

Grant Program Description
Web3 Foundation Proof of Concept: We collaborated with the Laboratory on Foundations and Tools for Software Engineering (LaFHIS) at the University of Buenos Aires to establish analysis techniques and tools for our detectors, as well as to create an initial list of vulnerability classes and code examples. View Grant | Application Form.

Prototype: We built a functioning prototype using linting detectors built with Dylint and expanded the list of vulnerability classes, detectors, and test cases. View Prototype | Application Form.
Aleph Zero We improved the precision and number of detectors for the tool with a multi-phase approach. This included a manual vulnerability analysis of projects within the Aleph Zero ecosystem, comprehensive testing of the tool on leading projects, and refining its detection accuracy.
Stellar Community Fund We added support for Stellar's smart contract language, Soroban. We included various output formats, such as an HTML report, improved the tool's precision and recall, and added a GitHub action to run the tool with pull requests.

About CoinFabrik

We - CoinFabrik - are a research and development company specialized in Web3, with a strong background in cybersecurity. Founded in 2014, we have worked on over 180 blockchain-related projects, EVM based and also for Solana, Algorand, Stellar and Polkadot. Beyond development, we offer security audits through a dedicated in-house team of senior cybersecurity professionals, currently working on code in Substrate, Solidity, Clarity, Rust, TEAL and Stellar Soroban.

Our team has an academic background in computer science and mathematics, with work experience focused on cybersecurity and software development, including academic publications, patents turned into products, and conference presentations. Furthermore, we have an ongoing collaboration on knowledge transfer and open-source projects with the University of Buenos Aires.

License

Scout is licensed and distributed under a MIT license. Contact us if you're looking for an exception to the terms.

Dependencies

~79MB
~1.5M SLoC