Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Slither for static analysis #243

Closed
PaulRBerg opened this issue Jan 5, 2023 · 8 comments
Closed

Run Slither for static analysis #243

PaulRBerg opened this issue Jan 5, 2023 · 8 comments
Assignees

Comments

@PaulRBerg
Copy link
Member

See the Static Analyzers section of the Foundry Book.

@andreivladbrg
Copy link
Member

What is this useful for? First time seeing this

@PaulRBerg
Copy link
Member Author

It's mostly useful for running a suite of vulnerability detectors that are not detected by the compiler - see the README.

I've known about Slither for a long time, it's a popular tool in Ethereum.

@PaulRBerg
Copy link
Member Author

PaulRBerg commented Jan 6, 2023

riiight, so I just installed and tried to use it, but got this error ..

Error:
Top level UsingForDirective not supported

Unfortunately, Slither does not support the latest feature introduced in Solidity v0.8.13, that is, using the using for directive for value types. There is an open issue about this:

crytic/slither#1352

I will label this issue as "backlog" for the time being.

@PaulRBerg
Copy link
Member Author

Update: the Slither team has just marked issue #1352 as completed.

Will remove the "backlog" label from our issue.

@PaulRBerg PaulRBerg removed the backlog label Jan 11, 2023
@PaulRBerg PaulRBerg self-assigned this Jan 23, 2023
@PaulRBerg
Copy link
Member Author

We're currently waiting for the following bug to be fixed so we can run Slither on the v2-core repository:

crytic/slither#1607

There's an open PR with a fix:

crytic/slither#1625

@PaulRBerg
Copy link
Member Author

That PR has been merged, so we should be able to run Slither now in this code base (though we have to build it from the source since they didn't release v0.9.3 just yet).

I will remove the backlog label now.

@PaulRBerg PaulRBerg removed the backlog label Mar 17, 2023
@PaulRBerg
Copy link
Member Author

I managed to run Slither using a version built from commit 776dcab.

Notes:

Going to drop Warp.dev permanlinks that contain the full report for all contracts:

@PaulRBerg PaulRBerg changed the title Integrate Slither for static analysis Run Slither for static analysis Mar 18, 2023
@PaulRBerg
Copy link
Member Author

Note: we will integrate Slither in CI once they ship a new version to PyPI, so that their GitHub Action will pull a version that works with user-defined value types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants