Skip to content

Commit

Permalink
Add slither to CI - Close #AM-1125 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
zarifpour authored Dec 12, 2023
1 parent b23300c commit 2aea188
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI

on:
workflow_dispatch:
push:
branches: [dev, master, main, wrapped-assets]
pull_request:
branches: [dev, master, main, wrapped-assets]
workflow_dispatch:

env:
MAINNET_NODE: ${{ secrets.MAINNET_NODE }}
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Slither Analysis

on:
workflow_dispatch:
push:
branches: [dev, master, main, wrapped-assets]
pull_request:
branches: [dev, master, main, wrapped-assets]

env:
MAINNET_NODE: ${{ secrets.MAINNET_NODE }}
GOERLI_NODE: ${{ secrets.GOERLI_NODE }}
POLYGON_NODE: ${{ secrets.POLYGON_NODE }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
PRIVATE_KEY: ${{ secrets.DUMMY_PK }}

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
node-version: 16
sarif: results.sarif
fail-on: none

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
Loading

0 comments on commit 2aea188

Please sign in to comment.