This is a work in progress, feel free to contribute!
- Proper testing of detectors (add known vulnerable circuits and analyze detection scope and false positives).
- Add proper detector documentation: implementation details, vulnerabilities to check, and remediation.
All the vulnerabilities are from zk-bug-tracker. Including examples and solutions.
This is software intended to detect unwated patterns or bad practices.
- Clone this repository (remember it has a submodule!).
~$ git clone --recursive git@github.com:NinaTea/Zorro.git
- Install the dependencies (Python >= 3.10). This also compiles the Circom grammar from the submodule, so a C compiler is needed.
~/Zorro$ python3 -m venv venv
~/Zorro$ source venv/bin/activate
~/Zorro$ pip install -r requirements.txt
- Make a directory at ~/Zorro$ with your circuits.
- Run this command
~/Zorro$ python3 zorro_analyzer_main.py <your_directory/>
example:
~/Zorro$ python3 zorro_analyzer_main.py tests/
- Bad practices
- Arithmetic Over/Under Flows
- Underconstrained Circuits
| Detector | Bug Type | Test Cases |
|---|---|---|
| to_do_comment | 1 | 1 |
| has_range_check | 2 | 1 |
| has_less_than_check | 2 | 1 |
| assigned_but_no_constrained | 3 | 1 |
