Skip to content

Commit

Permalink
ci: add slither job
Browse files Browse the repository at this point in the history
chore: fix solc remap path in slither config
  • Loading branch information
scorpion9979 committed Oct 20, 2023
1 parent 91887da commit 2ca4f7a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,36 @@ jobs:
- name: "Add coverage summary"
run: |
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $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"
solc-version: "0.8.19"
target: "src/"

- 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
2 changes: 1 addition & 1 deletion slither.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"detectors_to_exclude": "naming-convention,reentrancy-events,solc-version,timestamp",
"filter_paths": "(lib|test)",
"solc_remaps": [
"@openzeppelin/contracts=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@prb/math/=lib/prb-math/",
"@prb/test/=lib/prb-test/src/",
"forge-std/=lib/forge-std/src/",
Expand Down

0 comments on commit 2ca4f7a

Please sign in to comment.