Tealer is a static analyzer for Teal code. It parses the Teal program, and builds its CFG. The analyzer comes with a set of vulnerabilities detectors and printers allowing to quickly review the contracts.
Run Tealer on a Teal contract:
tealer program.teal
For additional configuration, see the Usage documentation.
Num | Detectors | What it Detects | Applies To | Impact | Confidence |
---|---|---|---|---|---|
1 | is-deletable |
Deletable Applications | Stateful | High | High |
2 | is-updatable |
Upgradable Applications | Stateful | High | High |
3 | unprotected-deletable |
Unprotected Deletable Applications | Stateful | High | High |
4 | unprotected-updatable |
Unprotected Upgradable Applications | Stateful | High | High |
5 | group-size-check |
Usage of absolute indexes without validating GroupSize | Stateless, Stateful | High | High |
6 | can-close-account |
Missing CloseRemainderTo field Validation | Stateless | High | High |
7 | can-close-asset |
Missing AssetCloseTo Field Validation | Stateless | High | High |
8 | missing-fee-check |
Missing Fee Field Validation | Stateless | High | High |
9 | rekey-to |
Rekeyable Logic Signatures | Stateless | High | High |
For more information, see
- The Detector Documentation for information on each detector
- The Detection Selection to run only selected detectors. By default, all the detectors are ran.
- Print CFG (
--print-cfg
): Export the CFG of the contract to a dot file. human-summary
: Print a human-readable summary of the contract.function-cfg
: Export the CFG of each subroutine in the contract, works for contracts written in version 4 or greater.call-graph
: Export the call-graph of the contract to a dot file, works for contracts written in version 4 or greater.
Printers output dot
files.
Use xdot
to open the files (sudo apt install xdot
).
git clone https://github.com/crytic/tealer.git && cd tealer
python3 setup.py install
We recommend to install the tool in a virtualenv.