From 752ad77985bff4aced918f22e7865125bf527975 Mon Sep 17 00:00:00 2001 From: Josselin Date: Sat, 21 Mar 2020 16:57:52 +0100 Subject: [PATCH 1/3] Fix spelling mistake (Fix 398) --- slither/detectors/variables/uninitialized_local_variables.py | 2 +- .../detectors/variables/uninitialized_storage_variables.py | 2 +- .../uninitialized_local_variable.uninitialized-local.json | 4 ++-- .../uninitialized_local_variable.uninitialized-local.txt | 2 +- .../uninitialized_storage_pointer.uninitialized-storage.json | 4 ++-- .../uninitialized_storage_pointer.uninitialized-storage.txt | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slither/detectors/variables/uninitialized_local_variables.py b/slither/detectors/variables/uninitialized_local_variables.py index 09d185208..766a091ec 100644 --- a/slither/detectors/variables/uninitialized_local_variables.py +++ b/slither/detectors/variables/uninitialized_local_variables.py @@ -98,7 +98,7 @@ Bob calls `transfer`. As a result, the ethers are sent to the address 0x0 and ar all_results = list(set(self.results)) for(function, uninitialized_local_variable) in all_results: - info = [uninitialized_local_variable, " is a local variable never initialiazed\n"] + info = [uninitialized_local_variable, " is a local variable never initialized\n"] json = self.generate_result(info) results.append(json) diff --git a/slither/detectors/variables/uninitialized_storage_variables.py b/slither/detectors/variables/uninitialized_storage_variables.py index 7efa3391b..a6a704e6b 100644 --- a/slither/detectors/variables/uninitialized_storage_variables.py +++ b/slither/detectors/variables/uninitialized_storage_variables.py @@ -101,7 +101,7 @@ Bob calls `func`. As a result, `owner` is override to 0. self._detect_uninitialized(function, function.entry_point, []) for(function, uninitialized_storage_variable) in self.results: - info = [uninitialized_storage_variable, " is a storage variable never initialiazed\n"] + info = [uninitialized_storage_variable, " is a storage variable never initialized\n"] json = self.generate_result(info) results.append(json) diff --git a/tests/expected_json/uninitialized_local_variable.uninitialized-local.json b/tests/expected_json/uninitialized_local_variable.uninitialized-local.json index 8e2b0d379..bffcd4bc4 100644 --- a/tests/expected_json/uninitialized_local_variable.uninitialized-local.json +++ b/tests/expected_json/uninitialized_local_variable.uninitialized-local.json @@ -77,8 +77,8 @@ } } ], - "description": "Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialiazed\n", - "markdown": "[Uninitialized.func().uint_not_init](tests/uninitialized_local_variable.sol#L4) is a local variable never initialiazed\n", + "description": "Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialized\n", + "markdown": "[Uninitialized.func().uint_not_init](tests/uninitialized_local_variable.sol#L4) is a local variable never initialized\n", "id": "8cb0b6b473ffecf3c2284584eb0012c742d36709f75c7516c3ba9748f3c27a98", "check": "uninitialized-local", "impact": "Medium", diff --git a/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt b/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt index 6d5827508..d53351eaa 100644 --- a/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt +++ b/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt @@ -1,4 +1,4 @@  -Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialiazed +Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialized Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables tests/uninitialized_local_variable.sol analyzed (1 contracts with 1 detectors), 1 result(s) found diff --git a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json index 02c5143d2..b828e0442 100644 --- a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json +++ b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json @@ -83,8 +83,8 @@ } } ], - "description": "Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialiazed\n", - "markdown": "[Uninitialized.func().st_bug](tests/uninitialized_storage_pointer.sol#L10) is a storage variable never initialiazed\n", + "description": "Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialized\n", + "markdown": "[Uninitialized.func().st_bug](tests/uninitialized_storage_pointer.sol#L10) is a storage variable never initialized\n", "id": "af9ceb591701024a2199a04e66a121086d330d4cdeb3b160514cce2bb440579f", "check": "uninitialized-storage", "impact": "High", diff --git a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt index 6c104545b..d9527c895 100644 --- a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt +++ b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt @@ -1,4 +1,4 @@  -Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialiazed +Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialized Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables tests/uninitialized_storage_pointer.sol analyzed (1 contracts with 1 detectors), 1 result(s) found From 7e54ed42f31dd7da718082366efaf906d863c737 Mon Sep 17 00:00:00 2001 From: Josselin Date: Sat, 21 Mar 2020 17:07:07 +0100 Subject: [PATCH 2/3] Fix finding id --- .../uninitialized_local_variable.uninitialized-local.json | 2 +- .../uninitialized_local_variable.uninitialized-local.txt | 1 + .../uninitialized_storage_pointer.uninitialized-storage.json | 2 +- .../uninitialized_storage_pointer.uninitialized-storage.txt | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/expected_json/uninitialized_local_variable.uninitialized-local.json b/tests/expected_json/uninitialized_local_variable.uninitialized-local.json index bffcd4bc4..c73376dcb 100644 --- a/tests/expected_json/uninitialized_local_variable.uninitialized-local.json +++ b/tests/expected_json/uninitialized_local_variable.uninitialized-local.json @@ -79,7 +79,7 @@ ], "description": "Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialized\n", "markdown": "[Uninitialized.func().uint_not_init](tests/uninitialized_local_variable.sol#L4) is a local variable never initialized\n", - "id": "8cb0b6b473ffecf3c2284584eb0012c742d36709f75c7516c3ba9748f3c27a98", + "id": "6ef627d0a3f7234c0d3dd339ae4cf3c1adf898f03384e08c3c8d846c67e0d476", "check": "uninitialized-local", "impact": "Medium", "confidence": "Medium" diff --git a/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt b/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt index d53351eaa..0d743f7f4 100644 --- a/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt +++ b/tests/expected_json/uninitialized_local_variable.uninitialized-local.txt @@ -2,3 +2,4 @@ Uninitialized.func().uint_not_init (tests/uninitialized_local_variable.sol#4) is a local variable never initialized Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables tests/uninitialized_local_variable.sol analyzed (1 contracts with 1 detectors), 1 result(s) found +Use https://crytic.io/ to get access to additional detectors and Github integration diff --git a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json index b828e0442..a41e6d963 100644 --- a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json +++ b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json @@ -85,7 +85,7 @@ ], "description": "Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialized\n", "markdown": "[Uninitialized.func().st_bug](tests/uninitialized_storage_pointer.sol#L10) is a storage variable never initialized\n", - "id": "af9ceb591701024a2199a04e66a121086d330d4cdeb3b160514cce2bb440579f", + "id": "b8f7c2470a8a7f83fd42dca40c50cbf2070e7fa5486c674585f2b0b39d3dc429", "check": "uninitialized-storage", "impact": "High", "confidence": "High" diff --git a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt index d9527c895..00b7beea5 100644 --- a/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt +++ b/tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt @@ -2,3 +2,4 @@ Uninitialized.func().st_bug (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialized Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables tests/uninitialized_storage_pointer.sol analyzed (1 contracts with 1 detectors), 1 result(s) found +Use https://crytic.io/ to get access to additional detectors and Github integration From 9a489030f0f376681d3ae34c50480cc94959adda Mon Sep 17 00:00:00 2001 From: Josselin Date: Sat, 21 Mar 2020 17:30:00 +0100 Subject: [PATCH 3/3] Update Dapp test --- scripts/travis_test_dapp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/travis_test_dapp.sh b/scripts/travis_test_dapp.sh index c3df4b1a0..49899c14f 100755 --- a/scripts/travis_test_dapp.sh +++ b/scripts/travis_test_dapp.sh @@ -20,7 +20,7 @@ dapp init slither . -if [ $? -eq 23 ] +if [ $? -eq 21 ] then exit 0 fi