Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add slither static analysis #211

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Coverage

on:
push:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Slither

on:
push:
branches:
- main
pull_request:
branches:
- "*"
types:
- synchronize
- opened
- reopened
- ready_for_review

jobs:
slither:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "18"

- name: Install Dependencies
run: yarn install

- name: Compile contracts
run: yarn compile

- name: Run Slither
uses: crytic/slither-action@main
id: slither
continue-on-error: true
with:
sarif: results.sarifs
node-version: "18"
fail-on: none

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
7 changes: 7 additions & 0 deletions slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"detectors_to_exclude": "",
"compile_force_framework": "hardhat",
"hardhat_ignore_compile": true,
"npx_disable": true,
"filter_paths": "artifacts,cache,data,dist,docs,lib,node_modules,pkg,scripts,tasks,test,testing,typechain-types"
}
Loading