Skip to content

ci: slither

ci: slither #15

Workflow file for this run

name: Slither analysis
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
analysis:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: pnpm/action-setup@v3
with:
version: 8
- run: cp .env.example .env
- run: pnpm install
- run: pnpm compile
- name: Run Slither
uses: crytic/[email protected]
with:
node-version: 20
ignore-compile: false
solc-version: "0.8.24"
slither-config: ".slither.config.json"
fail-on: none
slither-args:
--checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
- 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/comment')
const header = '# Slither report'
const body = process.env.REPORT
await script({ github, context, header, body })