crytic / crytic/slither

False positives (function modifiers not understood)

Open
#735 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

It seems like Slither doesn't take into account function modifiers?

`onlyOwner` not taken into account:
```
function kill() external onlyOwner {
selfdestruct(msg.sender);
}
```
`kill() allows anyone to destruct the contract`

`nonReentrant` not taken into account.
Using Openzeppelin ReentrancyGuard and nonReentrant modifier, I still get many reentrancy warnings from Slither.

Could Slither be smarter and analyze function modifiers?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.