Skip to content

Commit

Permalink
🚑 Update Slither workflow to include SARIF file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Feb 20, 2024
1 parent 69a70ef commit c2fe10b
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
name: Slither Analysis
on: [push]

jobs:
analyze:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# Optionally, set up Node.js if your project requires it
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

# Optionally, install JavaScript dependencies if your project requires it
- name: Install JavaScript Dependencies
run: yarn install --frozen-lockfile
- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install Foundry Dependencies
run: forge install

- name: Build Contracts
run: yarn build

# Run Slither static analyzer
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
sarif: results.sarif
fail-on: medium

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
fail-on: "medium" # Action will fail if issues of medium severity or higher are found
sarif_file: ${{ steps.slither.outputs.sarif }}

0 comments on commit c2fe10b

Please sign in to comment.