-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add aderyn to github actions (#210)
- Loading branch information
1 parent
aab7a4e
commit 9a03aba
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "Aderyn Static Analysis" | ||
description: "Run Aderyn static analysis and upload the report as an artifact" | ||
|
||
inputs: | ||
rust_toolchain: | ||
description: "Rust toolchain version" | ||
required: true | ||
default: "stable" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ inputs.rust_toolchain }} | ||
|
||
- name: Install Aderyn | ||
run: cargo install --git https://github.com/Cyfrin/aderyn.git | ||
shell: bash | ||
|
||
- name: Generate Aderyn Report | ||
id: run_aderyn | ||
run: | | ||
aderyn --output report.md . 2>&1 | tee aderyn_output.log | ||
shell: bash | ||
|
||
- name: Print Aderyn Warnings to Console | ||
run: cat report.md | ||
shell: bash | ||
|
||
- name: Upload Aderyn Report as Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: aderyn-report | ||
path: report.md | ||
|
||
- name: Check Aderyn Report for Warnings | ||
run: | | ||
if grep -E "warning:|Found issues" aderyn_output.log; then | ||
echo "Aderyn analysis found warnings." | ||
exit 1 | ||
else | ||
echo "No warnings or issues found by Aderyn." | ||
fi | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Aderyn Static Analysis | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
aderyn: | ||
runs-on: blacksmith-2vcpu-ubuntu-2204 | ||
|
||
steps: | ||
- name: Run Aderyn Static Analysis | ||
uses: axelarnetwork/axelar-gmp-sdk-solidity/.github/actions/aderyn@main |