This guide provides an overview of the contribution workflow to help make the contribution process effective for everyone involved.
Aderyn is a Rust-based solidity smart contract static analyzer designed to help protocol engineers and security researchers find vulnerabilities in Solidity code bases.
Thanks to its detectors, running Cyfrin Aderyn on your Solidity codebase will highlight all the issues currently supported, drastically reducing the potential for unknown vulnerabilities in your Solidity code.
Aderyn also makes it easier for smart contract engineers and protocols to create custom detectors to find specific or unsupported code vulnerabilities.
Read the README and consult the docs for an in-depth project overview.
Cyfrin Aderyn aims to give engineers and smart contract security researchers reliable and open-source Solidity static analysis tools to find and suggest solutions to smart contract vulnerabilities while adapting quickly and efficiently to different codebases.
The project is under active development. Indexed in DeepWiki.
You can contribute to this repo in many ways:
- Solve open issues
- Report bugs or feature requests
- Improve the documentation
Contributions are made via Issues and Pull Requests (PRs). A few general guidelines for contributions:
- Search for existing Issues and PRs before creating your own.
- Contributions should only fix/add the functionality in the issue OR address style issues, not both.
- If you're running into an error, please give context. Explain what you're trying to do and how to reproduce the error.
git clone https://github.com/Cyfrin/aderyn.git
cd aderyn
just setup-
Work on the issue and write unit tests
- Add Solidity test files to
tests/contract-playground/for small additions - For larger test cases, create your own project under
tests/. Prefer projects without external dependencies鈥攗seforge init --no-gitfor a minimal Foundry setup - Run specific tests with
cargo test <test-name>
- Add Solidity test files to
-
Generate reports to verify your changes using
cargo prep. This command runs Aderyn against test projects and outputs baseline reports toreports/. These reports are committed to the repo, and CI verifies that your changes produce the expected output.cargo prep -n playground # Generate report for contract-playground cargo prep # Show all available test projects
-
Polish your PR before submitting. This regenerates reports and fixes code quality issues.
cargo blesspr # Run all checks to satisfy CIQuick fixes only? For small changes, you can skip the full
blessprand just run:cargo fixfmt && cargo fixclippy -
Open a pull request to the
devbranch. A maintainer (@alexroan or @TilakMaddy) will review it.
Test projects live in tests/ and are registered in reportgen.toml. To add a new one:
-
Create a directory under
tests/with your Solidity files -
Add a configuration entry to
reportgen.toml:[[reports]] name = "my-project" # Used as: cargo prep -n my-project description = "My test project" root = "tests/my-project" ci_setup = "pnpm install --prefix tests/my-project" # If dependencies needed
-
If your project has dependencies (npm/pnpm/yarn), add the install command to the
setuprecipe injustfile:(run_install "my-project" \ pnpm install --prefix tests/my-project --frozen-lockfile) & pids+=($!)
Also add the
node_modulespath to thecleanrecipe. -
Generate the baseline report:
cargo prep -n my-project
This creates
reports/my-project-report.md.
See reportgen.toml for all available configuration options.
Project types
- Foundry projects: Include a
foundry.toml. Useargsto specify source directories. - Standalone Solidity files: Just add
.solfiles. Optionally include anaderyn.tomlfor configuration. - Hardhat projects: Work out of the box if compilation artifacts exist.
We follow the "fork-and-pull" Git workflow.
- Fork the repo
- Clone the project
- Create a new branch with a descriptive name
- Commit your changes to the new branch
- Push changes to your fork
- Open a PR in our repository and tag one of the maintainers to review your PR
Here are some tips for a high-quality pull request:
- Create a title for the PR that accurately defines the work done.
- Structure the description neatly to make it easy for the readers to consume. For example, you can include bullet points and screenshots instead of having one large paragraph.
- Add the link to the issue if applicable.
- Have a good commit message that summarises the work done.
Once you submit your PR:
- We may ask questions, request additional information, or ask for changes to be made before a PR can be merged. These are to clarify the PR for everyone involved and create a frictionless interaction process.
- As you update your PR and apply changes, mark each conversation resolved.
Once the PR is approved, we'll "squash-and-merge" to keep the git commit history clean.
Issues should be used to report problems, request a new feature, or discuss potential changes before a PR is created.
Please review our existing issues to find one that interests you.
If a contributor is working on an issue, they will be assigned to it. If you find an issue to work on, you are welcome to assign it to yourself and open a PR with a fix.
If a related issue doesn't exist, you can open a new issue.
Some tips to follow when you are creating an issue:
- Provide as much context as possible. Over-communicate to give the most details to the reader.
- Include the steps to reproduce the issue or the reason for adding the feature.
- Screenshots, videos, etc., are highly appreciated.