crytic / slither

Static Analyzer for Solidity and Vyper
https://blog.trailofbits.com/2018/10/19/slither-a-solidity-static-analysis-framework/
GNU Affero General Public License v3.0
5.23k stars 955 forks source link

[Bug-Candidate]: Slither python API went wrong when multiple SPDX license #2532

Open alexanderhawl opened 4 weeks ago

alexanderhawl commented 4 weeks ago

Describe the issue:

I downloaed the smart contracts source code and use slither to detect them in python. But the smart contract which have two different SPDX license in its two subcontracts. So the Slither('EPEPE.sol') went wrong. The error is multiple SPDX license. https://etherscan.io/address/0xcd8d706ada4fd5c540e47d98f126f991813c44ed#code

Code example to reproduce the issue:

from slither.slither import Slither  
cts=Slither('EPEPE.sol')

Version:

0.10.3

Relevant log output:

Multiple SPDX license
elopez commented 4 weeks ago

Hi! Can you post the complete Slither output? I don't think we have anything in particular that detects multiple SPDX licenses; what you're seeing might be an error/warning from solc (the compiler).

alexanderhawl commented 4 weeks ago

I think It's a solc error. Can I solve it in slither?

elopez commented 4 weeks ago

If it's a solc error you need to solve it in the solidity code. Slither requires code that can be compiled successfully.