-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add slither anaylser to github workflow
- Loading branch information
1 parent
3cf83ad
commit 307ac99
Showing
1 changed file
with
24 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 |
---|---|---|
|
@@ -45,3 +45,27 @@ jobs: | |
directory: coverage/ | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# Run Slither if Solidity changes are detected | ||
- name: Run Slither | ||
uses: crytic/[email protected] | ||
id: slither | ||
if: steps.contract_changes.outputs.src == 'true' | ||
with: | ||
ignore-compile: true | ||
target: "./" | ||
solc-version: "0.8.20" | ||
fail-on: none | ||
slither-args: --filter-paths "openzeppelin" --exclude-informational --exclude-optimization --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ | ||
|
||
- name: Create/update checklist as PR comment | ||
uses: actions/github-script@v7 | ||
if: github.event_name == 'pull_request' && steps.contract_changes.outputs.src == 'true' | ||
env: | ||
REPORT: ${{ steps.slither.outputs.stdout }} | ||
with: | ||
script: | | ||
const script = require('.github/scripts/comment') | ||
const header = '# Slither report' | ||
const body = process.env.REPORT | ||
await script({ github, context, header, body }) |