chore: enable slither #537
Workflow file for this run
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
# We manually setup and run slither here, as the prebaked github action | |
# (at https://github.com/crytic/slither-action) | |
# fails with permission errors inside the docker container for this project | |
name: Slither Analysis | |
on: | |
push: | |
paths: | |
- "protocol/**" | |
- ".github/workflows/slither.yaml" | |
jobs: | |
analyze: | |
# if: ${{ false }} # Slither has an issue with prb math, and is super slow... | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: install foundry | |
uses: foundry-rs/foundry-toolchain@v1.0.9 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
cache-dependency-path: protocol/slither.requirements.txt | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: protocol/yarn.lock | |
- name: install slither | |
run: cd protocol && pip install -r slither.requirements.txt | |
- name: install node packages | |
run: cd protocol && yarn | |
- name: run slither | |
run: cd protocol && yarn slither-check |