-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (45 loc) · 1.3 KB
/
security-analysis.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
name: 🔒️ Smart contract security analysis
on:
workflow_dispatch:
pull_request:
push:
branches: ["main"]
# cancel previous runs on the same PR
concurrency:
group: ${{ github.ref }}-analysis
cancel-in-progress: true
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "🔨 Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: "💾 Foundry fork cache"
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: foundry-${{ hashFiles('foundry.toml') }}
- name: "💾 Foundry compilation cache"
uses: actions/cache@v3
with:
path: |
cache
out
key: foundry-${{ github.repository_id }}-${{ hashFiles('foundry.toml') }}
- name: "🔒️ Run Slither"
uses: crytic/[email protected]
id: slither
with:
solc-version: 0.8.21
sarif: results.sarif
fail-on: none
slither-config: 'tools/slither.config.json'
- name: "📈 Upload SARIF file report"
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}