From 5552a10179f9cc60f6ae6bc730f02d57a548d375 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Mon, 2 May 2022 20:34:09 -0300 Subject: [PATCH 01/10] create slither.yml --- .github/workflows/slither.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/slither.yml diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml new file mode 100644 index 0000000..6acdcd3 --- /dev/null +++ b/.github/workflows/slither.yml @@ -0,0 +1,12 @@ +name: Slither Analysis +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + analyze: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: crytic/slither-action@v0.1.1 From e51fb58a33f3741a932b5c6df733aa6950df7e74 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Mon, 2 May 2022 20:37:15 -0300 Subject: [PATCH 02/10] fix - main branch name --- .github/workflows/slither.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 6acdcd3..8d01e10 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -1,9 +1,9 @@ name: Slither Analysis on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: analyze: runs-on: ubuntu-latest From 9f31fd1d3afc4ff0e44f578e1e4615f405d6abec Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Mon, 2 May 2022 20:53:07 -0300 Subject: [PATCH 03/10] install foundry --- .github/workflows/slither.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 8d01e10..7ab895d 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -8,5 +8,13 @@ jobs: analyze: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + - uses: crytic/slither-action@v0.1.1 From 0008346997e1cd7b102478b76aad08fb4bff4c6d Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Mon, 2 May 2022 21:16:26 -0300 Subject: [PATCH 04/10] sarif integration --- .github/workflows/slither.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 7ab895d..75aa46d 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -1,14 +1,17 @@ name: Slither Analysis + on: push: branches: [ main ] pull_request: branches: [ main ] + jobs: analyze: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout Repository + uses: actions/checkout@v3 with: submodules: recursive @@ -17,4 +20,14 @@ jobs: with: version: nightly - - uses: crytic/slither-action@v0.1.1 + - name: Run Slither + uses: crytic/slither-action@v0.1.1 + continue-on-error: true + id: slither + with: + sarif: results.sarif + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: ${{ steps.slither.outputs.sarif }} From 7551bf00cafe11d9e8b8fc8bafe5947b66413251 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Mon, 2 May 2022 21:30:04 -0300 Subject: [PATCH 05/10] removing sarif while private repo --- .github/workflows/slither.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 75aa46d..500d1b3 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -23,11 +23,11 @@ jobs: - name: Run Slither uses: crytic/slither-action@v0.1.1 continue-on-error: true - id: slither - with: - sarif: results.sarif + # id: slither + # with: + # sarif: results.sarif - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: ${{ steps.slither.outputs.sarif }} + # - name: Upload SARIF file + # uses: github/codeql-action/upload-sarif@v1 + # with: + # sarif_file: ${{ steps.slither.outputs.sarif }} From 67093946b51f9967d6f04a05baec2b98e81feb28 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Tue, 3 May 2022 10:43:47 -0300 Subject: [PATCH 06/10] using PR for foundry slither-action --- .github/workflows/slither.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 500d1b3..a8fc3d6 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -15,17 +15,12 @@ jobs: with: submodules: recursive - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - name: Run Slither - uses: crytic/slither-action@v0.1.1 - continue-on-error: true - # id: slither - # with: - # sarif: results.sarif + uses: crytic/slither-action@dev-install-foundry + # continue-on-error: true + # id: slither + # with: + # sarif: results.sarif # - name: Upload SARIF file # uses: github/codeql-action/upload-sarif@v1 From d84e157f94ae9e8f0cee9027ad8a464990b8acd3 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Tue, 3 May 2022 10:46:27 -0300 Subject: [PATCH 07/10] ignore errors temporary --- .github/workflows/slither.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index a8fc3d6..bd984e6 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -17,7 +17,7 @@ jobs: - name: Run Slither uses: crytic/slither-action@dev-install-foundry - # continue-on-error: true + continue-on-error: true # id: slither # with: # sarif: results.sarif From a3f0e4be868cc0d53922cb5929ef789cede4cf00 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Tue, 3 May 2022 10:50:46 -0300 Subject: [PATCH 08/10] adding todo's --- .github/workflows/slither.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index bd984e6..68cb449 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -15,9 +15,13 @@ jobs: with: submodules: recursive + # [TODO]: Change "uses" back to crytic/slither-action@v0.1.1 (whatever new version) + # once https://github.com/crytic/slither-action/pull/8 gets merged - name: Run Slither - uses: crytic/slither-action@dev-install-foundry + uses: crytic/slither-action@dev-install-foundry continue-on-error: true + # [TODO]: configure repo to allow us using SARIF or wait to be public + # so we get proper visual report of the analysis # id: slither # with: # sarif: results.sarif From 0cae42b389ec93492192b0938f30f767c4306386 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Tue, 3 May 2022 10:55:58 -0300 Subject: [PATCH 09/10] testing alternative flow --- .github/workflows/slither.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 68cb449..61941a1 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -15,11 +15,27 @@ jobs: with: submodules: recursive + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Install dependencies + run: forge install + + - name: Build project + run: forge build --extra-output abi --extra-output userdoc --extra-output devdoc --extra-output evm.methodIdentifiers --force + + - name: Run Slither + uses: crytic/slither-action@v0.1.1 + with: + ignore-compile: true + # [TODO]: Change "uses" back to crytic/slither-action@v0.1.1 (whatever new version) # once https://github.com/crytic/slither-action/pull/8 gets merged - - name: Run Slither - uses: crytic/slither-action@dev-install-foundry - continue-on-error: true + # - name: Run Slither + # uses: crytic/slither-action@dev-install-foundry + # continue-on-error: true # [TODO]: configure repo to allow us using SARIF or wait to be public # so we get proper visual report of the analysis # id: slither From c192e210f58d4cae41825694b1c41993c08c9111 Mon Sep 17 00:00:00 2001 From: Eliecer Chicott Date: Tue, 3 May 2022 11:21:53 -0300 Subject: [PATCH 10/10] back to working version with continue on error flag --- .github/workflows/slither.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 61941a1..e9d3b8d 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -15,33 +15,18 @@ jobs: with: submodules: recursive - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Install dependencies - run: forge install - - - name: Build project - run: forge build --extra-output abi --extra-output userdoc --extra-output devdoc --extra-output evm.methodIdentifiers --force - - - name: Run Slither - uses: crytic/slither-action@v0.1.1 - with: - ignore-compile: true - # [TODO]: Change "uses" back to crytic/slither-action@v0.1.1 (whatever new version) # once https://github.com/crytic/slither-action/pull/8 gets merged - # - name: Run Slither - # uses: crytic/slither-action@dev-install-foundry - # continue-on-error: true - # [TODO]: configure repo to allow us using SARIF or wait to be public - # so we get proper visual report of the analysis + - name: Run Slither + uses: crytic/slither-action@dev-install-foundry + # [NOTE]: continue-on-error ignores warnings. We are using all available Detectors for every Severity. + continue-on-error: true # id: slither # with: # sarif: results.sarif + # [TODO]: Configure repository to allow us using SARIF or wait for the repo to be public. + # This will allow us to get proper visual report of the analysis done by Slither. # - name: Upload SARIF file # uses: github/codeql-action/upload-sarif@v1 # with: