muellerberndt / sabre

Security analyzer for Solidity smart contracts. Uses the MythX smart contract security service.
https://mythx.io
MIT License
60 stars 23 forks source link

Incorrect documentation links in output #20

Closed sjukeshov closed 5 years ago

sjukeshov commented 5 years ago

I run these 2 simple contracts with Sabre on Ubuntu 16.04:

sabre contracts/MetaCoin.sol 

contracts/MetaCoin.sol
  -1:0  warning  MythX API trial mode  ]8;;https://smartcontractsecurity.github.io/SWC-registry/docs/]8;;

✖ 1 problem (0 errors, 1 warning)

sap1ens@sap1ens:~/MetaCoin$ sabre contracts/
ConvertLib.sol                Migrations.sol                storage.sol                   typo_safe_math.sol            visibility_not_set.sol        
MetaCoin.sol                  .placeholder                  typo_one_command.sol          visibility_not_set_fixed.sol  .vscode/                      
sap1ens@sap1ens:~/MetaCoin$ sabre contracts/ConvertLib.sol 

contracts/ConvertLib.sol
   1:0  warning  A floating pragma is set  ]8;;https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-103SWC-103]8;;
  -1:0  warning  MythX API trial mode      ]8;;https://smartcontractsecurity.github.io/SWC-registry/docs/]8;;

✖ 2 problems (0 errors, 2 warnings)

So there are 3 issues:

  1. All links have these weird ]8;; prefix and postfix on links
  2. Mythx API trial mode link https://smartcontractsecurity.github.io/SWC-registry/docs/ is not exist
  3. Link to issue about pragma also has incorrect link of https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-103SWC-103
muellerberndt commented 5 years ago

This should be fixed in v0.1.3. @sjukeshov can you verify?

sjukeshov commented 5 years ago

for same run I'm getting another issue:

sabre contracts/MetaCoin.sol
Error: 
There was a problem loading formatter option: stylish 
Error: Cannot find module 'eslint/lib/formatters/stylish'
muellerberndt commented 5 years ago

Hmm can you update to 0.1.4 and try again please? I fixed the dependencies (I hope).

sjukeshov commented 5 years ago

looks better:

sabre contracts/ConvertLib.sol 

contracts/ConvertLib.sol
   6:15  warning  integer overflow          https://smartcontractsecurity.github.io/SWC-registry/docs/
   1:0   warning  A floating pragma is set  https://smartcontractsecurity.github.io/SWC-registry/docs/
  -1:0   warning  MythX API trial mode      https://smartcontractsecurity.github.io/SWC-registry/docs/

but now all SWC registry links are same (without issue link) and also going to non existent page

muellerberndt commented 5 years ago

Good catch ;)

Should be fixed now.

sjukeshov commented 5 years ago

looks good now