diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 59048deb5..3dc059a1e 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -1,43 +1,42 @@ -# # Disabled, since we do not have any contracts in this repo. -# name: Slither Analysis +name: Slither Analysis -# on: -# pull_request: -# push: -# branches: -# - develop -# - main -# - master +on: + pull_request: + push: + branches: + - develop + - main + - master -# jobs: -# analyze: -# name: Run Slither -# runs-on: ubuntu-latest -# permissions: -# contents: read -# security-events: write -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# - name: Get Diff -# uses: technote-space/get-diff-action@v6.1.2 -# with: -# PATTERNS: | -# **/*.sol -# - name: Node dependencies Install -# run: | -# cd contracts && npm i -# cp -r node_modules/@openzeppelin . -# - name: Run Slither Action -# uses: crytic/slither-action@v0.3.0 -# continue-on-error: true -# id: slither -# with: -# sarif: slither.sarif -# target: contracts/ -# if: "env.GIT_DIFF" -# - name: Upload SARIF file -# uses: github/codeql-action/upload-sarif@v2 -# with: -# sarif_file: ${{ steps.slither.outputs.sarif }} -# if: "env.GIT_DIFF" +jobs: + analyze: + name: Run Slither + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Get Diff + uses: technote-space/get-diff-action@v6.1.2 + with: + PATTERNS: | + **/*.sol + - name: Node dependencies Install + run: | + cd contracts && npm i + cp -r node_modules/@openzeppelin . + - name: Run Slither Action + uses: crytic/slither-action@v0.3.0 + continue-on-error: true + id: slither + with: + sarif: slither.sarif + target: contracts/ + if: "env.GIT_DIFF" + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: ${{ steps.slither.outputs.sarif }} + if: "env.GIT_DIFF"