MCPcopy Create free account
hub / github.com/0xKitsune/sstan

github.com/0xKitsune/sstan @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
347 symbols 919 edges 73 files 24 documented · 7% updated 2y ago★ 8455 open issues

Browse by type

Functions 311 Types & classes 36
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

sstan Github Actions

sstan is a Solidity static analyzer specifically designed for the Code4Arena Bot Races. With the constantly changing landscape of the bot races, this design prioritizes DevX, using an Extractor pattern and macros to enable extremely quick development times when implementing new patterns. sstan comes "out of the box" with patterns to identify 50+ optimizations, vulnerabilities and QA patterns.

Table of Contents

 

Installation

First, make sure that you have Rust installed. Then you can enter the following commands in your terminal.

git clone https://github.com/0xKitsune/sstan &&
cd sstan &&
cargo install --path .

 

Usage

Now that you have sstan installed, you can use the sstan command from anywhere in your terminal. By default, sstan looks for a ./src directory and analyzes every file within the folder. If you would like to specify the directory sstan should target, you can pass the --path flag (ex. sstan --path <path_to_dir>).

In the default configuration, sstan runs analysis for every currently included optimization, vulnerability and QA pattern, however if you would like to run analysis for select patterns, you can create a .toml file for your custom configuration. You can use the default sstan.toml configuration for reference. After creating a custom .toml file, make sure to pass the --toml flag when running sstan (ex. sstan --toml <path_to_toml_file>).

Usage: sstan [OPTIONS]

Options:
  -p, --path <PATH>      Path to the root directory to analyze. The default directory is `./src`
  -o, --output <OUTPUT>  Path to the directory where the report will be written. The default directory is `./`
  -g, --git <GIT>        Github repository link for the codebase being analyzed (e.g `https://github.com/repo/blob/main`). This will create hyperlinks to line numbers within the final report.
  -t, --toml <TOML>      Path to `.toml` file containing a custom sstan configuration.
  -h, --help             Print help

 

Contributing

Check out Contributing.md for adding new features.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 222
Function 89
Class 23
Interface 9
Enum 4

Languages

Rust100%

Modules by API surface

src/extractors/visitor.rs128 symbols
src/report.rs24 symbols
src/extractors/primitive.rs17 symbols
src/utils.rs14 symbols
src/engine.rs11 symbols
src/vulnerabilities/unprotected_self_destruct.rs6 symbols
src/extractors/mod.rs6 symbols
src/optimizations/safe_math.rs5 symbols
bin/sstan.rs5 symbols
src/qa/public_functions.rs4 symbols
src/optimizations/increment_decrement.rs4 symbols
src/optimizations/immutable_variable.rs4 symbols

For agents

$ claude mcp add sstan \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page