Merge pull request #604 from crytic/incorrect-solc-fixes

Fixes and improvements to the incorrect solc version detector
pull/624/head
Feist Josselin 4 years ago committed by GitHub
commit c0b2c12465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      slither/detectors/attributes/incorrect_solc.py
  2. 6
      tests/expected_json/solc_version_incorrect.solc-version.json
  3. 2
      tests/expected_json/solc_version_incorrect.solc-version.txt

@ -150,11 +150,14 @@ Consider using the latest version of Solidity for testing."""
info = [
"solc-",
self.slither.crytic_compile.compiler_version.version,
" is not recommended for deployement\n",
" is not recommended for deployment\n",
]
json = self.generate_result(info)
# TODO: Once crytic-compile adds config file info, add a source mapping element pointing to
# the line in the config that specifies the problematic version of solc
results.append(json)
return results

@ -80,9 +80,9 @@
},
{
"elements": [],
"description": "solc-0.4.25 is not recommended for deployement\n",
"markdown": "solc-0.4.25 is not recommended for deployement\n",
"id": "5a4264386059605a5ac36e3f7dbc853e89e337be5bfbd8b05a64964a81d73790",
"description": "solc-0.4.25 is not recommended for deployment\n",
"markdown": "solc-0.4.25 is not recommended for deployment\n",
"id": "4d64003d70a62b1c6963f871e841b6cbd633d07d95554e1a50e0f25d9b71ebb3",
"check": "solc-version",
"impact": "Informational",
"confidence": "High"

@ -1,7 +1,7 @@

Pragma version^0.4.23 (tests/solc_version_incorrect.sol#2) allows old versions
Pragma version>=0.4.0<0.6.0 (tests/solc_version_incorrect.sol#3) allows old versions
solc-0.4.25 is not recommended for deployement
solc-0.4.25 is not recommended for deployment
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity
tests/solc_version_incorrect.sol analyzed (1 contracts with 1 detectors), 3 result(s) found
Use https://crytic.io/ to get access to additional detectors and Github integration

Loading…
Cancel
Save