Skip to content

Add comment.js and update slither.yml workflow #15

Add comment.js and update slither.yml workflow

Add comment.js and update slither.yml workflow #15

Workflow file for this run

name: Slither Analysis
on: push
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
node-version: '16'
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 })