From 6f62c29d231ff70c7800d9e9692f01f79942ae4a Mon Sep 17 00:00:00 2001 From: PacificYield <173040337+PacificYield@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:39:47 +0100 Subject: [PATCH] ci: slither --- .github/workflows/slither.yml | 37 +++++++++++++++++++++++++++++++++++ .slither.config.json | 4 ++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/slither.yml create mode 100644 .slither.config.json diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml new file mode 100644 index 0000000..411b760 --- /dev/null +++ b/.github/workflows/slither.yml @@ -0,0 +1,37 @@ +name: Slither analysis +on: + pull_request: + branches: + - main + push: + branches: + - main +jobs: + analysis: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 20 + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: pnpm/action-setup@v3 + with: + version: 8 + - run: cp .env.example .env + - run: pnpm install + - run: pnpm compile + - name: Run Slither + uses: crytic/slither-action@v0.4.0 + with: + node-version: 20 + ignore-compile: false + solc-version: "0.8.24" + slither-config: ".slither.config.json" + sarif: results.sarif + fail-on: none + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif diff --git a/.slither.config.json b/.slither.config.json new file mode 100644 index 0000000..7e86fee --- /dev/null +++ b/.slither.config.json @@ -0,0 +1,4 @@ +{ + "solc_remaps": ["@openzeppelin/=node_modules/@openzeppelin/", "fhevm/=node_modules/fhevm/"], + "filter_paths": "node_modules/|lib/|test/" +}