Consensys / truffle-security

MythX smart contract security verification plugin for Truffle Framework
https://mythx.io
124 stars 28 forks source link

truffle-security.json is mandatory configuration since 1.3.3 #173

Closed elenadimitrova closed 5 years ago

elenadimitrova commented 5 years ago

The documentation states that

Configuration options can also be stored as json

but it doesn't seem mandatory, yet when I run truffle run verify --debug=2 it produces the following error:

truffle-security.json either not found or improperly formatted.
expected to find truffle-security.json in: /Users/Elena/colonyNetwork
Compiling ./contracts/ContractEditing.sol...
/Users/Elena/colonyNetwork/contracts/ContractEditing.sol
error Command failed with exit code 1.

This could be an issue with the --debug flag in particular but without it I just get

Compiling ./contracts/ContractEditing.sol...
/Users/Elena/colonyNetwork/contracts/ContractEditing.sol
error Command failed with exit code 1.

truffle run verify --version output

truffle-security 1.3.3
api: v1.4.12, harvey: 0.0.16, hash: 704340ba8c2dff2d75d0a6123b250723, maestro: 1.2.6, maru: 0.4.2, mythril: 0.20.3, url: https://api.mythx.io
elenadimitrova commented 5 years ago

Event after adding the configuration options in a truffle-security.json, compilation fails with same exit code 1

elenadimitrova commented 5 years ago

Surprisingly only after disabling docker in truffle.js does it compile the contracts. Maybe related to https://github.com/ConsenSys/truffle-security/issues/145?

daniyarchambylov commented 5 years ago

@elenadimitrova thanks for investigating issue. I'll take a look at it!

daniyarchambylov commented 5 years ago

@elenadimitrova I've ran truffle run verify with docker enabled and disabled and I don't have any problem. truffle-security.json file is optional. I'm sorry for misleading message. We'll improve it :) We have also put a new release 1.3.4. Please try it and let us know if release fixes issues

elenadimitrova commented 5 years ago

@daniyarchambylov with 1.3.4 it compiles successfully but it still emits the error:

truffle-security.json either not found or improperly formatted.
expected to find truffle-security.json in: /Users/Elena/colonyNetwork
⠋ Fetching solc version list from solc-bin⠋ Fetching solc version list from solc-bin⠋ Fetching solc version list from solc-bin⠋ Fetching solc version list from sol⠏ Downloading compilerCompiling ./contracts/IReputationMiningCycle.sol...
  with dependencies:
...
daniyarchambylov commented 5 years ago

Thanks @elenadimitrova! There is #176 open to remove error message.

nbanmp commented 5 years ago

If this is still an issue, feel free to reopen the issue with more details.