{"id":13794733,"url":"https://github.com/crytic/echidna-action","last_synced_at":"2025-05-01T15:30:28.361Z","repository":{"id":43163133,"uuid":"437106945","full_name":"crytic/echidna-action","owner":"crytic","description":"GitHub Action to run Echidna, the Ethereum smart contract fuzzer","archived":false,"fork":false,"pushed_at":"2024-02-29T17:02:46.000Z","size":29,"stargazers_count":60,"open_issues_count":6,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T15:06:25.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crytic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-10T20:34:33.000Z","updated_at":"2024-11-01T14:21:03.000Z","dependencies_parsed_at":"2024-01-07T06:22:57.599Z","dependency_job_id":"62dcd263-8bda-4cbe-a7d4-397d665c39d6","html_url":"https://github.com/crytic/echidna-action","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fechidna-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fechidna-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fechidna-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fechidna-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crytic","download_url":"https://codeload.github.com/crytic/echidna-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251898497,"owners_count":21661837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T23:00:46.955Z","updated_at":"2025-05-01T15:30:28.012Z","avatar_url":"https://github.com/crytic.png","language":"Shell","funding_links":[],"categories":["Tools"],"sub_categories":["CI/CD"],"readme":"# Echidna action\n\nThis action allows you to run `echidna-test` from within a GitHub Actions\nworkflow. The action builds on the `trailofbits/echidna` Docker image, adding\n`solc-select` and providing a simpler way to execute Echidna as part of an\nActions workflow.\n\nTo learn more about [Echidna](https://github.com/crytic/echidna) itself, visit\nits [GitHub repository](https://github.com/crytic/echidna) and [wiki\npages](https://github.com/crytic/echidna/wiki).\n\n## Inputs\n\n| Key                  | Description\n|----------------------|------------\n| `files`              | **Required** Solidity files or folders to analyze.\n| `contract`           | Contract to analyze.\n| `config`             | Config file (CLI arguments override config options).\n| `format`             | Output format: json, text, none. Disables interactive UI.\n| `corpus-dir`         | Directory to store corpus and coverage data.\n| `test-mode`          | Type of tests to be performed: property, assertion, overflow, optimization, exploration.\n| `multi-abi`          | Use multi-abi mode of testing.\n| `test-limit`         | Number of sequences of transactions to generate during testing.\n| `shrink-limit`       | Number of tries to attempt to shrink a failing sequence of transactions.\n| `seq-len`            | Number of transactions to generate during testing.\n| `contract-addr`      | Address to deploy the contract to test.\n| `deployer`           | Address of the deployer of the contract to test.\n| `sender`             | Addresses to use for the transactions sent during testing.\n| `seed`               | Run with a specific seed.\n| `crytic-args`        | Additional arguments to use in crytic-compile for the compilation of the contract to test.\n| `solc-args`          | Additional arguments to use in solc for the compilation of the contract to test.\n| `solc-version`       | Version of the Solidity compiler to use.\n| `output-file`        | Capture echidna-test's output into a file. The path must be relative to the repository root.\n| `echidna-version`    | Version of the Echidna Docker image to use.\n| `negate-exit-status` | Apply logical NOT to echidna-test's exit status (for testing the action).\n| `echidna-workdir`    | Path to run echidna-test from. Note that `files` and `config` are relative to this path.\n\n## Outputs\n\n| Key           | Description\n|---------------|------------\n| `output-file` | If produced, the file containing echidna-test's output, relative to the repository root.\n\n## Examples\n\n### Basic usage\n\n```yaml\nuses: crytic/echidna-action@v2\nwith:\n  files: contracts/\n  contract: Marketplace\n```\n\n### Example workflow: Hardhat\n\nThe following is a complete GitHub Actions workflow example. It will trigger\nwith commits on `master` as well as any pull request opened against the `master`\nbranch. It will configure NodeJS 16.x on the runner, and then install project\ndependencies (using `npm ci`). Once the environment is set up, it will build the\nproject (using `npx hardhat compile`) and finally run Echidna against a contract\ncalled `TokenEchidna`. The workflow will fail if Echidna breaks any of the\ninvariants in `TokenEchidna`.\n\nIn this example, we are leveraging `crytic-args` to pass\n`--hardhat-ignore-compile`. This skips building the project as part of the\nEchidna action, and instead takes advantage of the already built contracts. This\nis required, as the Echidna action environment does not have NodeJS available.\n\n```yaml\nname: Echidna Test\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v3\n    - name: Use Node.js 16\n      uses: actions/setup-node@v2\n      with:\n        node-version: 16\n        cache: 'npm'\n    - name: Install dependencies\n      run: npm ci\n    - name: Compile contracts\n      run: npx hardhat compile\n    - name: Run Echidna\n      uses: crytic/echidna-action@v2\n      with:\n        solc-version: 0.7.6\n        files: .\n        contract: TokenEchidna\n        crytic-args: --hardhat-ignore-compile\n```\n\n### Example workflow: Foundry\n\nThe following is a complete GitHub Actions workflow example. It will trigger\nwith commits on `main` as well as any pull request opened against the `main`\nbranch. It will install Foundry on the runner, and then it will build the\nproject (using `forge build --build-info`) and finally run Echidna against a\ncontract called `TokenEchidna`. The workflow will fail if Echidna breaks any of\nthe invariants in `TokenEchidna`.\n\nIn this example, we are leveraging `crytic-args` to pass `--ignore-compile`.\nThis skips building the project as part of the Echidna action, and instead takes\nadvantage of the already built contracts. This is required, as the Echidna\naction environment does not have `forge` available.\n\n```yaml\nname: Echidna Test\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\nenv:\n  FOUNDRY_PROFILE: ci\n\njobs:\n  test:      \n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v3\n      with:\n        submodules: recursive\n\n    - name: Install Foundry\n      uses: foundry-rs/foundry-toolchain@v1\n      with:\n        version: nightly\n\n    - name: Compile contracts\n      run: |\n        forge build --build-info\n\n    - name: Run Echidna\n      uses: crytic/echidna-action@v2\n      with:\n        files: .\n        contract: TokenEchidna\n        crytic-args: --ignore-compile\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fechidna-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrytic%2Fechidna-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fechidna-action/lists"}