diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml new file mode 100644 index 00000000..005fe070 --- /dev/null +++ b/.github/workflows/slither.yml @@ -0,0 +1,22 @@ +name: Slither Analysis + +on: [push] +jobs: + analyze: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - run: cp ./contracts/.env.example ./contracts/.env + - run: npm --prefix ./contracts ci --include=optional + - run: npm --prefix ./contracts install + - run: npm --prefix ./contracts run 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: "contracts/.slither.config.json" + sarif: results.sarif + fail-on: none diff --git a/contracts/.slither.config.json b/contracts/.slither.config.json new file mode 100644 index 00000000..eacbdef5 --- /dev/null +++ b/contracts/.slither.config.json @@ -0,0 +1,4 @@ +{ + "solc_remaps": ["@openzeppelin/=node_modules/@openzeppelin/"], + "filter_paths": "contracts/node_modules/|contracts/lib/|contracts/test/|fhevm-engine/|proto/" +}