CLI Options
Below are options which may be included with the aderyn CLI command.
aderyn <ROOT>
aderyn <ROOT>
The root directory of your Solidity project.
Input:
aderyn .
--help
--help
Outputs the options and arguments available when using Aderyn.
-o, --output <OUTPUT>
-o, --output <OUTPUT>
- The default output is report.md
. This can be renamed to anything you'd like. Currently supported formats include Markdown and JSON. JSON is particularly useful in CI/CD pipelines to compile properties from the generated report.
Examples:
-s, --src <SOURCE_PATH>
-s, --src <SOURCE_PATH>
The path to the source contracts folder. If not provided, the ROOT
directory will be used.
If your project has a foundry.toml
file in the ROOT, then aderyn will obtain this value from it.
Examples based on the below directory structure:
Command:
aderyn --src contracts/
-i, --path-includes <PATH_INCLUDES>
-i, --path-includes <PATH_INCLUDES>
A string, or list of strings separated by commas that pertain to the filenames/directories in scope. These are the files/directories that Aderyn will be run on.
Note: strings passed to the scope command are case-sensitive.
Examples will be based on the below repo:
Input:
aderyn -i src/interfaces
Output:
src/interfaces/IFlashLoanReceiver.sol
13
src/interfaces/IPoolFactory.sol
4
src/interfaces/ITSwapPool.sol
4
src/interfaces/IThunderLoan.sol
4
Total
25
Input:
aderyn --path-includes Thund
Output:
src/interfaces/IThunderLoan.sol
4
src/protocol/ThunderLoan.sol
176
src/upgradedProtocol/ThunderLoanUpgraded.sol
172
Total
352
-x, --path-excludes <PATH_EXCLUDE>
-x, --path-excludes <PATH_EXCLUDE>
the opposite of --path-includes
, this will exclude any files or directories that contain the passed string.
Input:
aderyn -x Thunder
Output:
src/interfaces/IFlashLoanReceiver.sol
13
src/interfaces/IPoolFactory.sol
4
src/interfaces/ITSwapPool.sol
4
src/protocol/AssetToken.sol
65
src/protocol/OracleUpgradeable.sol
23
Total
109
-n, --no-snippets
-n, --no-snippets
The default behavior is to include the line number, as well as snippets of code where the vulnerability is detected within the generated report. This can potentially take up a lot of space in the report. This option will disable the snippets, leaving the line number readouts only.
Input (default):
aderyn -i Thunder`
Found in src/protocol/ThunderLoan.sol Line: 239
Input (no-snippets):
Output:
Found in src/protocol/ThunderLoan.sol Line: 239
aderyn --version
aderyn --version
Outputs the current version of Aderyn installed
Input:
Output:
aderyn 0.0.13
aderyn registry
aderyn registry
Output the list of detectors.
Input:
Output:
Last updated