trailofbits / manticore

Symbolic execution tool
https://blog.trailofbits.com/2017/04/27/manticore-symbolic-execution-for-humans/
GNU Affero General Public License v3.0
3.66k stars 470 forks source link

Node modules not found #2540

Closed reubenr0d closed 2 years ago

reubenr0d commented 2 years ago

Summary of the problem

Failed to build contract None Errors : Invalid solc compilation Error: Source "@openzeppelin/contracts/proxy/utils/Initializable.sol" not found: File not found.
 --> contracts/tenderizer/Tenderizer.sol:8:1:
  |
8 | import "@openzeppelin/contracts/proxy/utils/Initializable.sol";

Imported node modules in contracts are not found, am I missing something?

Manticore version

0.3.7

Python version

Python 2.7.18

OS / Environment

Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal

Dependencies

attrs==19.3.0 Automat==0.8.0 blinker==1.4 certifi==2019.11.28 chardet==3.0.4 Click==7.0 cloud-init==21.1 colorama==0.4.3 command-not-found==0.3 configobj==5.0.6 constantly==15.1.0 cryptography==2.8 crytic-compile==0.2.2 cytoolz==0.11.2 dbus-python==1.2.16 distro==1.4.0 distro-info===0.23ubuntu1 entrypoints==0.3 eth-hash==0.3.2 eth-typing==3.0.0 eth-utils==2.0.0 future==0.18.2 httplib2==0.14.0 hyperlink==19.0.0 idna==2.8 importlib-metadata==1.5.0 incremental==16.10.1 intervaltree==3.1.0 Jinja2==2.10.1 jsonpatch==1.22 jsonpointer==2.0 jsonschema==3.2.0 keyring==18.0.1 language-selector==0.1 launchpadlib==1.10.13 lazr.restfulclient==0.14.2 lazr.uri==1.0.3 manticore==0.3.7 MarkupSafe==1.1.0 more-itertools==4.2.0 netifaces==0.10.4 oauthlib==3.1.0 pexpect==4.6.0 ply==3.11 prettytable==3.2.0 protobuf==3.20.0 pyasn1==0.4.2 pyasn1-modules==0.2.1 pyevmasm==0.2.3 PyGObject==3.36.0 PyHamcrest==1.9.0 PyJWT==1.7.1 pymacaroons==0.13.0 PyNaCl==1.3.0 pyOpenSSL==19.0.0 pyrsistent==0.15.5 pyserial==3.4 pysha3==1.0.2 python-apt==2.0.0+ubuntu0.20.4.4 python-debian===0.1.36ubuntu1 PyYAML==5.3.1 requests==2.22.0 requests-unixsocket==0.2.0 rlp==3.0.0 SecretStorage==2.3.1 service-identity==18.1.0 simplejson==3.16.0 six==1.14.0 solc-select==0.2.1 sortedcontainers==2.4.0 sos==4.1 ssh-import-id==5.10 systemd-python==234 toolz==0.11.2 Twisted==18.9.0 ubuntu-advantage-tools==27.0 ufw==0.36 unattended-upgrades==0.1 urllib3==1.25.8 wadllib==1.3.3 wasm==1.2 wcwidth==0.2.5 z3-solver==4.8.15.0 zipp==1.0.0 zope.interface==4.7.1

Step to reproduce the behavior

run manticore <file_name>

Expected behavior

Properly maps contracts from node modules

Actual behavior

Says contracts from modules are not found

Any relevant logs

reubenr0d commented 2 years ago

Hmm, this seems like an issue with crytic-compile, which is not able to pickup the modules

superical commented 2 years ago

@reubenr0d Did you manage to resolve the issue with crytic-compile? How did you manage to get crytic-compile to pick up the files in node modules?

reubenr0d commented 2 years ago

Naah, as a workaround, I changed the dependancies to use the relative paths, like ./node_modules/@openzeppelin/.. @superical