-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (49 loc) · 1.59 KB
/
slither-analyze.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Slither Analyze
on:
pull_request:
branches:
- mainnet
- testnet
- "feature/*"
- "features/*"
- "feat/*"
- "feats/*"
- "release/*"
- "implement-feature/*"
env:
FOUNDRY_PROFILE: ci
jobs:
check-slither:
strategy:
fail-fast: true
name: Slither Analyze
runs-on: [self-hosted, dockerize]
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install package with soldeer
run: forge soldeer install
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
node-version: 18
fail-on: none
slither-args: --exclude-optimization --exclude-low --exclude-medium --exclude-informational --exclude-dependencies --filter-paths "dependencies/|script/|test/foundry/" --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'
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 })