Skip to content

Commit

Permalink
store slither report as sarif
Browse files Browse the repository at this point in the history
  • Loading branch information
preston4896 committed Nov 8, 2024
1 parent b206352 commit 38403da
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
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 })

0 comments on commit 38403da

Please sign in to comment.