Visual Studio Code Extension for SECBIT Solidity Static Analysis ExtensionThis is an Visual Studio Code Extension for running SECBIT Solidity Static Analysis over Solidity source code. FeaturesThis extension is an user interface to the SECBIT Solidity Static Analysis Extension which extended the Solidity compiler to provide additional diagnostics on known issues and violations of best practices. The main functionality is provided via the context menu command Triggering this command would run the SECBIT-extended RequirementsThis extension does not provide Solidity language support. Some other extension, such as solidity-extended, should be installed for this extension to function properly. This extension ships with a copy of the UsageCopy this repository to Extension SettingsThis extension provides the following settings:
Currently Supported ChecksERC20 Specificapprove-no-event
erc20-mintable
Contract is mintable (The contract, or any of its base contract, contains a function with the name matching erc20-no-decimals
The contract and all of its base contract do not have a This error only reports on a contract that is not a base contract of any other contract. erc20-no-name
The contract and all of its base contract do not have a This error only reports on a contract that is not a base contract of any other contract. erc20-no-return
SECBIT: transferFrom-no-return erc20-no-symbol
The contract and all of its base contract do not have a This error only reports on a contract that is not a base contract of any other contract. transfer-no-event
ERC20 transfer functions should emit Transfer event in some cases. transfer-no-revert
ERC20 transfer functions should revert in some cases. transferfrom-no-allowed-check
No check on approve-with-balance-verify
SECBIT: approve-with-balance-verify short-addr
The short-address attack. Vulnerabilitiesblockhash
The return value of dirty-padding
Be aware of "dirty higher order bits". Solidity: security considerations int-div
Integer division. forced-ether
Conditions on ether balance are not reliable since ether could be forced into a contract. ConsenSys: forcibly sending ether to a contract pull-vs-push
Avoid DoS by using a pull payment system ConsenSys: DoS with unexpected revert private-modifier
Data with redundant-fallback
Fallback function with a single reentrance
The DAO attack. ConsenSys: avoid state changes after external calls This check uses SMT solver. send-vs-transfer
Preferred ConsenSys: Be aware of the tradeoffs between send(), transfer(), and call.value() timestamp
ConsenSys: Timestamp Dependence tx-origin
Avoid using ConsenSys: avoid using tx.origin unchecked-math
Integer over/underflows. ConsenSys: integer overflow and underflow This check uses SMT solver. Coding style issuesbad-name
Event names should start with upper cases and function names should start with lower cases. constant-mutability
Using deprecating delegatecall
Using fix-version
It is recommended to use a fixed language version. hardcode-addr
Hard-coded address in the contract. implicit-visibility
Visibility is not specified explicitly. no-return
No return statement in a function that returns value. pure-function
Could use a more strict state-mutability specification. revert-vs-require
Use suicide
Using sha3
Using throw
Using type-inference
Unsafe type inference. view-immutable
Could use a more strict state-mutability specification. Gas optimizationbyte-array
Reduce gas consumption by replacing Known IssuesBeing an static analysis tool, false positives and false negatives are unavoidable. Bug reports are welcomed. Contact UsIf you run into any issues or have suggestions for us, feel free to create issues and pull requests. Related Projects
LicenseThis extension is open-sourced under the MIT license in the LICENSE file of this repository. |