-
Notifications
You must be signed in to change notification settings - Fork 41
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
Slither CI #32
Slither CI #32
Conversation
Note: I had to run Eventually you end up running |
I found out that running the analyzer repeatedly might yield different results.
I updated 13f71b4 by running All in all, this looks somewhat brittle. It should always be analyzing the same files with the same inputs and skipping the same problems, but the results vary from run to run. EDIT: looks like a bug indeed; I've left a public example for the maintainers to review in balancer/balancer-v2-monorepo#2514. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🚢 🚢
It is indeed disappointing that Slither behaves in a non-deterministic manner. We can certainly hope for improvements in future versions. Nevertheless, I believe it's a valuable addition to our toolkit and CI pipeline. Let's make it a practice to run it prior to every major release, even with its current limitations.
One last thing: if you run You can make it work again by clearing the cache and running |
Description
This PR:
interfaces
andsolidity-utils
.yarn build
does the same as before, butyarn compile
does not remove the artifacts anymore.I've added a section with the results of the Slither triage. Maybe we can improve these templates and add a table or something standard to describe what we are skipping, since the DB files are not human-readable.
To verify, download the changes and revert the commits with the triage results.
On top of that: I've considered having one config file for each package instead of having a global one. E.g. in
interfaces
we are always going to skip the compiler version check. But ultimately I think it's not a huge improvement, since it'd create more config files. I also considered creating a hidden.slither
folder inside each package to store the config file and the DB with the triage results, but apparently the DB's path cannot be configured :(Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution
N/A
Slither triage
See complete results without the changes to the DBs: slither-triage.txt.
Summary
Summary of skipped detections below:
Interfaces
Pragma version^0.8.0 (contracts/solidity-utils/helpers/ITemporarilyPausable.sol#3) allows old versions
Solidity-utils:
LogExpMath
performs a multiplication on the result of a division (multiple instances)FixedPoint
uses assembly (multiple instances)LogExpMath
is not in mixedCase (multiple instances)LogExpMath
uses literals with too many digits (multiple instances)FixedPoint.MIN_POW_BASE_FREE_EXPONENT
(contracts/math/FixedPoint.sol#23) is never used in FixedPoint