feat: new aderyn workflow #47
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
on: [push, pull_request, workflow_dispatch] | |
name: Run Aderyn | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install aderyn | |
run: | | |
curl -L https://raw.githubusercontent.com/Cyfrin/aderyn/dev/cyfrinup/install | bash | |
export PATH="/home/runner/.cyfrin/bin:$PATH" | |
cyfrinup | |
- name: Run aderyn | |
run: | | |
export PATH="/home/runner/.cyfrin/bin:$PATH" | |
aderyn . -o ci-report.json | |
- name: Check report | |
run: | | |
jq '.issue_count | .critical, .high, .medium' ci-report.json | while read value; do | |
if [ "$value" -gt 0 ]; then | |
echo "Found issues: critical, high, or medium issue count is above zero." | |
exit 1 | |
fi | |
done |