diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index b555771b..f3a1550a 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -1,4 +1,4 @@ -name: Test +name: Coverage on: push: diff --git a/.github/workflows/slither.yaml b/.github/workflows/slither.yaml new file mode 100644 index 00000000..d7a266f2 --- /dev/null +++ b/.github/workflows/slither.yaml @@ -0,0 +1,50 @@ +name: Slither + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + types: + - synchronize + - opened + - reopened + - ready_for_review + +jobs: + slither: + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: "18" + + - name: Install Dependencies + run: yarn install + + - name: Compile contracts + run: yarn compile + + - name: Run Slither + uses: crytic/slither-action@main + id: slither + continue-on-error: true + with: + sarif: results.sarifs + node-version: "18" + fail-on: none + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: ${{ steps.slither.outputs.sarif }} diff --git a/slither.config.json b/slither.config.json new file mode 100644 index 00000000..4d277b69 --- /dev/null +++ b/slither.config.json @@ -0,0 +1,7 @@ +{ + "detectors_to_exclude": "", + "compile_force_framework": "hardhat", + "hardhat_ignore_compile": true, + "npx_disable": true, + "filter_paths": "artifacts,cache,data,dist,docs,lib,node_modules,pkg,scripts,tasks,test,testing,typechain-types" +}