Skip to content

Commit

Permalink
add slither analysis to CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
bluele committed Sep 20, 2024
1 parent cb73f69 commit 3d8c720
Showing 3 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -36,3 +36,16 @@ jobs:

- name: Lint
run: make lint

slither:
name: Slither analysis
needs: contract-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: crytic/[email protected]
with:
node-version: 20.13
slither-version: 0.10.1
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SOLC_VERSION=0.8.20
FORGE=forge
SLITHER=slither
TEST_UPGRADEABLE=false

.PHONY: build
@@ -18,6 +19,10 @@ test:
coverage:
@$(FORGE) coverage --ffi --use solc:$(SOLC_VERSION)

.PHONY: slither
slither:
@$(SLITHER) .

.PHONY: fmt
fmt:
@$(FORGE) fmt $(FORGE_FMT_OPTS) \
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_run": "arbitrary-send-erc20,array-by-reference,incorrect-shift,name-reused,rtlo,suicidal,uninitialized-storage,arbitrary-send-erc20-permit,controlled-array-length,controlled-delegatecall,delegatecall-loop,msg-value-loop,reentrancy-eth,unchecked-transfer,weak-prng,domain-separator-collision,erc20-interface,erc721-interface,locked-ether,mapping-deletion,shadowing-abstract,tautology,write-after-write,boolean-cst,reentrancy-no-eth,reused-constructor,tx-origin,unchecked-lowlevel,unchecked-send,variable-scope,void-cst,events-access,events-maths,incorrect-unary,boolean-equal,deprecated-standards,erc20-indexed,function-init-state,pragma,reentrancy-unlimited-gas,immutable-states,var-read-using-this",
"filter_paths": "(test/|node_modules/|contracts/proto/)"
}

0 comments on commit 3d8c720

Please sign in to comment.