Quickstart
Last updated
Was this helpful?
Last updated
Was this helpful?
Aderyn uses a series of that, given a set of Solidity smart contracts within a directory, analyze the smart contracts Abstract Syntax Tree () to find vulnerability patterns and report them in an easy-to-consume markdown document.
In this article, you will learn how to get started using Aderyn to analyze your Solidity codebase and generate a report on its vulnerabilities.
Before installing Aderyn, ensure you have the following:
Suggested VSCode extensions:
Once Aderyn is installed on your system, you can run it against any Solidity codebase to find vulnerabilities in your code.
You can follow along by cloning it to your system.
Navigate inside the repository:
Once your smart contracts have been successfully compiled, run Aderyn using the following command:
What happens when you call aderyn?
Search for all Solidity files within the directory structure
Your codebase's full markdown security report will be generated for you now.
You can direct the output to a specific file or change the format to JSON for integration with other tools:
Inside the generated report, you will find:
A summary of your codebase properties (nsloc, complexity, etc.)
A summary of the issues and their severity divided by Highs and Lows.
A list of the issues with descriptions and links to the line of code where the vulnerability was found
Aderyn installed: Follow this guide to learn on your system.
- Rust language support for Visual Studio Code
- Improved Rust syntax highlighting
In this example, we will use the .
This example codebase uses Foundry. Please as a prerequisite to working with this example repository.
We usually use several smart contracts and tests to try new . Install dependencies and build the contracts by running:
Replace [OPTIONS]
with specific as needed.
Compile the Solidity files and load their ASTs into its
For each available , call and pass in the
When executed, Aderyn will generate a full security report of your Solidity code base. You can find the standard here:
Cyfrin Aderyn gives engineers and security an easy-to-implement framework to develop custom static analysis detectors that can adapt to any codebase or use case. You can learn more about creating on the related documentation page.