-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slither action, naming conventions, long digits
- Loading branch information
1 parent
4217bc3
commit 4a940c4
Showing
6 changed files
with
101 additions
and
128 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 |
---|---|---|
@@ -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" |
Oops, something went wrong.