Skip to content

chore(deps): update crytic/slither-action action to v0.4.0 #39

chore(deps): update crytic/slither-action action to v0.4.0

chore(deps): update crytic/slither-action action to v0.4.0 #39

name: Solidity Analysis
on:
pull_request:
branches:
- '**'
paths:
- 'contracts/**'
- '.github/workflows/solidity-analysis.yml'
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Slither Analyzer
uses: crytic/slither-action@v0.3.1
with:
node-version: 18
- name: Print Summary
id: print
run: |
summary=$(jq '.results.printers[0].markdown' slither-results.json)
summary="${summary//'%'/'%25'}"
summary="${summary//$'\n'/'%0A'}"
summary="${summary//$'\r'/'%0D'}"
echo "summary=$summary" >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## Slither Analyzer Summary'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Slither Analyzer Summary
${{ fromJSON(steps.print.outputs.summary) }}
edit-mode: replace