Skip to content

Commit

Permalink
chore: add slither github action
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmad committed Jan 23, 2024
1 parent e5f36d0 commit 7dcd048
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Slither Analysis

on:
push:
branches: [dev]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
slither:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install
run: |
pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: |
pnpm run build
- name: Run Slither
uses: crytic/[email protected]
continue-on-error: true
id: slither
with:
sarif: results.sarif
fail-on: none
ignore-compile: true
node-version: 20
target: "contracts/"

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}

0 comments on commit 7dcd048

Please sign in to comment.