Skip to content

Commit

Permalink
Use Slither for Solidity contracts static analysis
Browse files Browse the repository at this point in the history
[Slither](https://github.com/crytic/slither) is a static analysis framework used
for Solidity contracts verification.

To install Slither execute:

```sh
pip3 install slither-analyzer
```

To run Slither execute:

```sh
slither .
```
  • Loading branch information
nkuba committed Nov 23, 2023
1 parent 26b3b73 commit 1c9651a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@ jobs:
core/typechain/
if-no-files-found: error

core-slither:
needs: [core-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Slither
env:
SLITHER_VERSION: 0.9.6
run: pip3 install slither-analyzer==$SLITHER_VERSION

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: core-build
path: core/

- name: Run Slither
run: slither --hardhat-ignore-compile .

core-test:
needs: [core-build]
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,24 @@ pre-commit run --all-files
# Execute hooks for specific files (e.g. Acre.sol):
pre-commit run --files ./core/contracts/Acre.sol
```

### Slither

[Slither](https://github.com/crytic/slither) is a static analysis framework used
for Solidity contracts verification.

#### Install

To install Slither execute:

```sh
pip3 install slither-analyzer
```

#### Usage

To run Slither execute:

```sh
slither .
```

0 comments on commit 1c9651a

Please sign in to comment.