Enable running slither as pre-commit hook

pull/2521/head
Daniel Bast 4 months ago
parent 9a5b4f5cff
commit fda26fa865
  1. 7
      .pre-commit-hooks.yaml
  2. 7
      README.md

@ -0,0 +1,7 @@
- id: slither
name: Slither
description: Run Slither on your project
entry: slither .
pass_filenames: false
language: python
files: \.sol$

@ -102,6 +102,13 @@ docker run -it -v /home/share:/share trailofbits/eth-security-toolbox
### Integration ### Integration
* For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action). * For GitHub action integration, use [slither-action](https://github.com/marketplace/actions/slither-action).
* For pre-commit integratio, use (replace `$GIT_TAG` with real tag)
```
- repo: https://github.com/crytic/slither
rev: $GIT_TAG
hooks:
- slither
```
* To generate a Markdown report, use `slither [target] --checklist`. * To generate a Markdown report, use `slither [target] --checklist`.
* To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`) * To generate a Markdown with GitHub source code highlighting, use `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/` (replace `ORG`, `REPO`, `COMMIT`)

Loading…
Cancel
Save