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

Slither fails to execute in latest docker tag #8

Closed
schemar opened this issue Apr 24, 2019 · 2 comments
Closed

Slither fails to execute in latest docker tag #8

schemar opened this issue Apr 24, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@schemar
Copy link

schemar commented Apr 24, 2019

I cannot run slither with the latest docker tag of eth-security-toolbox. It appears npx is missing from the image. Current fix: manually running sudo npm install -g npx.

I am not sure what changed, but our project used to work fine, but now requires this manual step in between.

  • Steps to reproduce:
    1. start eth-security-toolbox with mounted project
      docker run -it -d -v /path/to/project:/share trailofbits/eth-security-toolbox
    2. cd into project repository (cd /share)
    3. run slither .
  • Expected output:
    • Slither code analysis.
  • Actual output:
INFO:Slither:'npx truffle@5.0.10 compile' running (use --truffle-version truffle@x.x.x to use specific version)
ERROR:root:Error in .
ERROR:root:Traceback (most recent call last):
  File "/home/ethsec/.local/lib/python3.6/site-packages/slither/__main__.py", line 554, in main_impl
    (results, number_contracts) = process(filename, args, detector_classes, printer_classes)
  File "/home/ethsec/.local/lib/python3.6/site-packages/slither/__main__.py", line 57, in process
    triage_mode=args.triage_mode)
  File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 58, in __init__
    kwargs.get('truffle_version', None))
  File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 142, in _init_from_truffle
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'npx': 'npx'
@ESultanik
Copy link
Collaborator

Thanks! This will be fixed in the next release, hopefully later today.

@ESultanik ESultanik added the bug Something isn't working label Apr 24, 2019
@ESultanik ESultanik self-assigned this Apr 24, 2019
schemar added a commit to schemar/openst-contracts that referenced this issue Apr 24, 2019
I added a FirewalledRule which can be extended in order to restrict
relaying of meta-transactions to organization workers.
The rule that is to be restricted must extend the FirewalledRule and add
the modifier `firewalled` to all relevant functions.

For testing I created two test contract files. One that uses the
modifier, and one that calls the one that uses the modifier. Required in
order to simulate rules calling on each other and checking for the
relayer.

Added a step to manually install npx inside docker until the docker
image is fixed. The problem is reported and confirmed at
trailofbits/eth-security-toolbox#8

Fixes OpenST#199
ESultanik added a commit that referenced this issue Apr 25, 2019
@ESultanik
Copy link
Collaborator

This is done, but it'll take a few hours before the Docker image is rebuilt on Dockerhub. Feel free to reopen if there is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants