Skip to content

Commit

Permalink
Feat/slither (#26)
Browse files Browse the repository at this point in the history
* base github action

* slither: no compile
  • Loading branch information
killroy192 authored Dec 27, 2023
1 parent 20b94ce commit acbf422
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ jobs:
permissions:
contents: read
packages: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
always-auth: true
cache: "npm"
node-version: "18.x"
registry-url: https://npm.pkg.github.com
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install Dependancies
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/security-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Quality Gate
on:
push:

env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build_and_validate:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
sarif: results.sarif
fail-on: none

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
18 changes: 9 additions & 9 deletions slither.config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"filter_paths": ["lib", "test"],
"solc_remaps": [
"ds-test/=lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"@chainlink/=lib/chainlink-brownie-contracts/",
"@openzeppelin/=node_modules/@openzeppelin/"
]
}
"solc_remaps": [
"@std=lib/forge-std/src/",
"forge-std/=lib/forge-std/src/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@chainlink/=node_modules/@chainlink/",
"@uniswap/=node_modules/@uniswap/",
"src/=src/"
]
}

0 comments on commit acbf422

Please sign in to comment.