From 38403da8cda29cbd0a5ed724ea64791768b8afe5 Mon Sep 17 00:00:00 2001 From: Preston Ong Date: Fri, 8 Nov 2024 18:15:46 +0800 Subject: [PATCH] store slither report as sarif --- .github/workflows/slither.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 72e9875..afb65cf 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -27,16 +27,21 @@ jobs: with: fail-on: none slither-args: --checklist --show-ignored-findings --markdown-root ${{ env.commit_url }} - + sarif: results.sarif - - name: Create/update checklist as PR comment - uses: actions/github-script@v7 - if: github.event_name == 'pull_request' - env: - REPORT: ${{ steps.slither.outputs.stdout }} + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 with: - script: | - const script = require('.github/scripts/slither-comment') - const header = '# Slither report' - const body = process.env.REPORT - await script({ github, context, header, body }) \ No newline at end of file + sarif_file: ${{ steps.slither.outputs.sarif }} + + # - name: Create/update checklist as PR comment + # uses: actions/github-script@v7 + # if: github.event_name == 'pull_request' + # env: + # REPORT: ${{ steps.slither.outputs.stdout }} + # with: + # script: | + # const script = require('.github/scripts/slither-comment') + # const header = '# Slither report' + # const body = process.env.REPORT + # await script({ github, context, header, body }) \ No newline at end of file