Skip to content

Commit

Permalink
Slither action, naming conventions, long digits
Browse files Browse the repository at this point in the history
  • Loading branch information
mireynolds committed Jul 15, 2023
1 parent 4217bc3 commit 4a940c4
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 128 deletions.
38 changes: 5 additions & 33 deletions .github/workflows/slither-report.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
name: Slither Report

on: [push, pull_request]

jobs:
slither-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
- uses: actions/checkout@v3
- uses: crytic/[email protected]
with:
python-version: '3.11'

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: forge install

- name: Install slither
run: pip install slither-analyzer

- name: Forge clean
run: forge clean

- name: Forge build without test & script
run: forge build --build-info --skip test --skip script

- name: Generate slither report
run: slither . --compile-force-framework "foundry" --foundry-out-directory "out" --ignore-compile --skip-clean --filter-paths "lib" --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ > slitherReport.md

- name: Check slither report
run: |
section=$(awk '/^##/{exit} {print}' slitherReport.md)
if [[ $section == *"Low"* || $section == *"Medium"* || $section == *"High"* ]]; then
echo "Low, Medium or High risk found in slither report. Failing the run."
exit 1
fi
target: "src/"
slither-args: "--checklist"
fail-on: "low"
Loading

0 comments on commit 4a940c4

Please sign in to comment.