Skip to content

Commit

Permalink
chore: add slither to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Oct 27, 2023
1 parent 249cc70 commit 9f28e46
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,34 @@ jobs:
- name: "Add test summary"
run: |
echo "## Foundry Unit tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
slither-analyze:
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
permissions:
actions: "read"
contents: "read"
security-events: "write"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

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

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

- name: "Add Slither summary"
run: |
echo "## Slither result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ solidity-flattenedContracts
typechain
slither-audit.txt
slither
slither.db.json

# Test output
coverage
Expand Down
4 changes: 4 additions & 0 deletions slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"detectors_to_exclude": "naming-convention,solc-version,timestamp",
"filter_paths": "(lib|test|mock|node_modules|deprecated)"
}
1 change: 1 addition & 0 deletions slither.db.json

Large diffs are not rendered by default.

0 comments on commit 9f28e46

Please sign in to comment.