Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
0f90ebb6
Unverified
Commit
0f90ebb6
authored
Apr 22, 2020
by
yann300
Committed by
GitHub
Apr 22, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1458 from ethereum/analysis-module-desc
analysis modules data updated
parents
af1be323
edd11046
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
49 additions
and
45 deletions
+49
-45
assignAndCompare.ts
...nalyzer/src/solidity-analyzer/modules/assignAndCompare.ts
+2
-2
blockBlockhash.ts
...-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts
+2
-2
blockTimestamp.ts
...-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts
+2
-2
checksEffectsInteraction.ts
...src/solidity-analyzer/modules/checksEffectsInteraction.ts
+2
-2
constantFunctions.ts
...alyzer/src/solidity-analyzer/modules/constantFunctions.ts
+3
-3
deleteDynamicArrays.ts
...yzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts
+2
-2
deleteFromDynamicArray.ts
...r/src/solidity-analyzer/modules/deleteFromDynamicArray.ts
+2
-2
erc20Decimals.ts
...x-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts
+2
-2
etherTransferInLoop.ts
...yzer/src/solidity-analyzer/modules/etherTransferInLoop.ts
+2
-2
forLoopIteratesOverDynamicArray.ts
...idity-analyzer/modules/forLoopIteratesOverDynamicArray.ts
+2
-2
gasCosts.ts
remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts
+2
-2
guardConditions.ts
...analyzer/src/solidity-analyzer/modules/guardConditions.ts
+2
-2
inlineAssembly.ts
...-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts
+2
-2
intDivisionTruncate.ts
...yzer/src/solidity-analyzer/modules/intDivisionTruncate.ts
+2
-2
list.ts
remix-analyzer/src/solidity-analyzer/modules/list.ts
+6
-2
lowLevelCalls.ts
...x-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts
+2
-2
noReturn.ts
remix-analyzer/src/solidity-analyzer/modules/noReturn.ts
+2
-2
selfdestruct.ts
remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts
+2
-2
similarVariableNames.ts
...zer/src/solidity-analyzer/modules/similarVariableNames.ts
+2
-2
stringBytesLength.ts
...alyzer/src/solidity-analyzer/modules/stringBytesLength.ts
+2
-2
thisLocal.ts
remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts
+2
-2
txOrigin.ts
remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts
+2
-2
No files found.
remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts
View file @
0f90ebb6
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, BlockAstNod
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, BlockAstNod
export
default
class
assignAndCompare
implements
AnalyzerModule
{
export
default
class
assignAndCompare
implements
AnalyzerModule
{
warningNodes
:
ExpressionStatementAstNode
[]
=
[]
warningNodes
:
ExpressionStatementAstNode
[]
=
[]
name
:
string
=
'Result not used: '
name
:
string
=
`Result not used: `
description
:
string
=
'The result of an operation was not used.'
description
:
string
=
`The result of an operation not used`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
blockBlockhash
implements
AnalyzerModule
{
export
default
class
blockBlockhash
implements
AnalyzerModule
{
warningNodes
:
FunctionCallAstNode
[]
=
[]
warningNodes
:
FunctionCallAstNode
[]
=
[]
name
:
string
=
'Blockhash usage: '
name
:
string
=
`Blockhash usage: `
description
:
string
=
'Semantics maybe unclear'
description
:
string
=
`Semantics maybe unclear`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts
View file @
0f90ebb6
...
@@ -7,8 +7,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -7,8 +7,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
blockTimestamp
implements
AnalyzerModule
{
export
default
class
blockTimestamp
implements
AnalyzerModule
{
warningNowNodes
:
IdentifierAstNode
[]
=
[]
warningNowNodes
:
IdentifierAstNode
[]
=
[]
warningblockTimestampNodes
:
MemberAccessAstNode
[]
=
[]
warningblockTimestampNodes
:
MemberAccessAstNode
[]
=
[]
name
:
string
=
'Block timestamp: '
name
:
string
=
`Block timestamp: `
description
:
string
=
'Semantics maybe unclear'
description
:
string
=
`Semantics maybe unclear`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts
View file @
0f90ebb6
...
@@ -9,8 +9,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractHLA
...
@@ -9,8 +9,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractHLA
InlineAssemblyAstNode
,
ReportFunction
,
VisitFunction
,
FunctionCallGraph
}
from
'./../../types'
InlineAssemblyAstNode
,
ReportFunction
,
VisitFunction
,
FunctionCallGraph
}
from
'./../../types'
export
default
class
checksEffectsInteraction
implements
AnalyzerModule
{
export
default
class
checksEffectsInteraction
implements
AnalyzerModule
{
name
:
string
=
'Check effects: '
name
:
string
=
`Check effects: `
description
:
string
=
'Avoid potential reentrancy bugs'
description
:
string
=
`Potential reentrancy bugs`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
...
...
remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts
View file @
0f90ebb6
...
@@ -10,8 +10,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractCal
...
@@ -10,8 +10,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractCal
FunctionHLAst
,
VariableDeclarationAstNode
,
FunctionCallGraph
,
FunctionCallAstNode
,
VisitFunction
,
ReportFunction
}
from
'./../../types'
FunctionHLAst
,
VariableDeclarationAstNode
,
FunctionCallGraph
,
FunctionCallAstNode
,
VisitFunction
,
ReportFunction
}
from
'./../../types'
export
default
class
constantFunctions
implements
AnalyzerModule
{
export
default
class
constantFunctions
implements
AnalyzerModule
{
name
:
string
=
'Constant functions: '
name
:
string
=
`Constant/View/Pure functions: `
description
:
string
=
'Check for potentially constant functions'
description
:
string
=
`Potentially constant/view/pure functions`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
...
@@ -63,7 +63,7 @@ export default class constantFunctions implements AnalyzerModule {
...
@@ -63,7 +63,7 @@ export default class constantFunctions implements AnalyzerModule {
comments
+=
(
multipleContractsWithSameName
)
?
'Note: Import aliases are currently not supported by this static analysis.'
:
''
comments
+=
(
multipleContractsWithSameName
)
?
'Note: Import aliases are currently not supported by this static analysis.'
:
''
if
(
func
[
'potentiallyshouldBeConst'
])
{
if
(
func
[
'potentiallyshouldBeConst'
])
{
warnings
.
push
({
warnings
.
push
({
warning
:
`
${
funcName
}
: Potentially should be constant but is not.
${
comments
}
`
,
warning
:
`
${
funcName
}
: Potentially should be constant
/view/pure
but is not.
${
comments
}
`
,
location
:
func
.
node
[
'src'
],
location
:
func
.
node
[
'src'
],
more
:
'http://solidity.readthedocs.io/en/develop/contracts.html#constant-functions'
more
:
'http://solidity.readthedocs.io/en/develop/contracts.html#constant-functions'
})
})
...
...
remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
deleteDynamicArrays
implements
AnalyzerModule
{
export
default
class
deleteDynamicArrays
implements
AnalyzerModule
{
rel
:
UnaryOperationAstNode
[]
=
[]
rel
:
UnaryOperationAstNode
[]
=
[]
name
:
string
=
'Delete on dynamic Array: '
name
:
string
=
`Delete on dynamic array: `
description
:
string
=
'Use require and appropriately'
description
:
string
=
`Use require/assert appropriately`
category
:
ModuleCategory
=
category
.
GAS
category
:
ModuleCategory
=
category
.
GAS
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
deleteFromDynamicArray
implements
AnalyzerModule
{
export
default
class
deleteFromDynamicArray
implements
AnalyzerModule
{
relevantNodes
:
UnaryOperationAstNode
[]
=
[]
relevantNodes
:
UnaryOperationAstNode
[]
=
[]
name
:
string
=
'Delete from dynamic Array: '
name
:
string
=
`Delete from dynamic array: `
description
:
string
=
'Using delete on an array leaves a gap'
description
:
string
=
`'delete' on an array leaves a gap`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts
View file @
0f90ebb6
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, VisitFuncti
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, VisitFuncti
FunctionHLAst
,
VariableDeclarationAstNode
}
from
'./../../types'
FunctionHLAst
,
VariableDeclarationAstNode
}
from
'./../../types'
export
default
class
erc20Decimals
implements
AnalyzerModule
{
export
default
class
erc20Decimals
implements
AnalyzerModule
{
name
:
string
=
'ERC20: '
name
:
string
=
`ERC20: `
description
:
string
=
'Decimal should be uint8'
description
:
string
=
`'decimals' should be 'uint8'`
category
:
ModuleCategory
=
category
.
ERC
category
:
ModuleCategory
=
category
.
ERC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/etherTransferInLoop.ts
View file @
0f90ebb6
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
etherTransferInLoop
implements
AnalyzerModule
{
export
default
class
etherTransferInLoop
implements
AnalyzerModule
{
relevantNodes
:
ExpressionStatementAstNode
[]
=
[]
relevantNodes
:
ExpressionStatementAstNode
[]
=
[]
name
:
string
=
'Ether transfer in a loop: '
name
:
string
=
`Ether transfer in loop: `
description
:
string
=
'Avoid transferring Ether to multiple addresses in a loop'
description
:
string
=
`Transferring Ether in a for/while/do-while loop`
category
:
ModuleCategory
=
category
.
GAS
category
:
ModuleCategory
=
category
.
GAS
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
forLoopIteratesOverDynamicArray
implements
AnalyzerModule
{
export
default
class
forLoopIteratesOverDynamicArray
implements
AnalyzerModule
{
relevantNodes
:
ForStatementAstNode
[]
=
[]
relevantNodes
:
ForStatementAstNode
[]
=
[]
name
:
string
=
'For loop iterates over dynamic array: '
name
:
string
=
`For loop over dynamic array: `
description
:
string
=
'The number of
\'
for
\'
loop iterations depends on dynamic array
\'
s size'
description
:
string
=
`Iterations depend on dynamic array's size`
category
:
ModuleCategory
=
category
.
GAS
category
:
ModuleCategory
=
category
.
GAS
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts
View file @
0f90ebb6
...
@@ -10,8 +10,8 @@ interface VisitedContract {
...
@@ -10,8 +10,8 @@ interface VisitedContract {
}
}
export
default
class
gasCosts
implements
AnalyzerModule
{
export
default
class
gasCosts
implements
AnalyzerModule
{
name
:
string
=
'Gas costs: '
name
:
string
=
`Gas costs: `
description
:
string
=
'Warn if the gas requirements of functions are too high.'
description
:
string
=
`Too high gas requirement of functions`
category
:
ModuleCategory
=
category
.
GAS
category
:
ModuleCategory
=
category
.
GAS
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
guardConditions
implements
AnalyzerModule
{
export
default
class
guardConditions
implements
AnalyzerModule
{
guards
:
FunctionCallAstNode
[]
=
[]
guards
:
FunctionCallAstNode
[]
=
[]
name
:
string
=
'Guard Conditions: '
name
:
string
=
`Guard conditions: `
description
:
string
=
'Use require and appropriately'
description
:
string
=
`Use 'require' and 'assert' appropriately`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts
View file @
0f90ebb6
...
@@ -4,8 +4,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -4,8 +4,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
inlineAssembly
implements
AnalyzerModule
{
export
default
class
inlineAssembly
implements
AnalyzerModule
{
inlineAssNodes
:
InlineAssemblyAstNode
[]
=
[]
inlineAssNodes
:
InlineAssemblyAstNode
[]
=
[]
name
:
string
=
'Inline assembly: '
name
:
string
=
`Inline assembly: `
description
:
string
=
'Use of Inline Assembly'
description
:
string
=
`Inline assembly used`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/intDivisionTruncate.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
intDivisionTruncate
implements
AnalyzerModule
{
export
default
class
intDivisionTruncate
implements
AnalyzerModule
{
warningNodes
:
BinaryOperationAstNode
[]
=
[]
warningNodes
:
BinaryOperationAstNode
[]
=
[]
name
:
string
=
'Data Truncated: '
name
:
string
=
`Data Truncated: `
description
:
string
=
'Division on int/uint values truncates the result.'
description
:
string
=
`Division on int/uint values truncates the result`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/list.ts
View file @
0f90ebb6
...
@@ -17,12 +17,15 @@ import erc20Decimals from './erc20Decimals'
...
@@ -17,12 +17,15 @@ import erc20Decimals from './erc20Decimals'
import
stringBytesLength
from
'./stringBytesLength'
import
stringBytesLength
from
'./stringBytesLength'
import
deleteFromDynamicArray
from
'./deleteFromDynamicArray'
import
deleteFromDynamicArray
from
'./deleteFromDynamicArray'
import
forLoopIteratesOverDynamicArray
from
'./forLoopIteratesOverDynamicArray'
import
forLoopIteratesOverDynamicArray
from
'./forLoopIteratesOverDynamicArray'
import
etherTransferInLoop
from
'./etherTransferInLoop'
import
intDivisionTruncate
from
'./intDivisionTruncate'
export
default
[
export
default
[
txOrigin
,
txOrigin
,
gasCosts
,
gasCosts
,
thisLocal
,
thisLocal
,
checksEffectsInteraction
,
checksEffectsInteraction
,
erc20Decimals
,
constantFunctions
,
constantFunctions
,
similarVariableNames
,
similarVariableNames
,
inlineAssembly
,
inlineAssembly
,
...
@@ -34,8 +37,9 @@ export default [
...
@@ -34,8 +37,9 @@ export default [
guardConditions
,
guardConditions
,
deleteDynamicArrays
,
deleteDynamicArrays
,
assignAndCompare
,
assignAndCompare
,
erc20Decimals
,
stringBytesLength
,
stringBytesLength
,
deleteFromDynamicArray
,
deleteFromDynamicArray
,
forLoopIteratesOverDynamicArray
forLoopIteratesOverDynamicArray
,
etherTransferInLoop
,
intDivisionTruncate
]
]
remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts
View file @
0f90ebb6
...
@@ -10,8 +10,8 @@ interface llcNode {
...
@@ -10,8 +10,8 @@ interface llcNode {
export
default
class
lowLevelCalls
implements
AnalyzerModule
{
export
default
class
lowLevelCalls
implements
AnalyzerModule
{
llcNodes
:
llcNode
[]
=
[]
llcNodes
:
llcNode
[]
=
[]
name
:
string
=
'Low level calls: '
name
:
string
=
`Low level calls: `
description
:
string
=
'Semantics maybe unclear'
description
:
string
=
`Semantics maybe unclear`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/noReturn.ts
View file @
0f90ebb6
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractHLA
...
@@ -6,8 +6,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, ContractHLA
VisitFunction
,
ReportFunction
,
ReturnAstNode
,
AssignmentAstNode
}
from
'./../../types'
VisitFunction
,
ReportFunction
,
ReturnAstNode
,
AssignmentAstNode
}
from
'./../../types'
export
default
class
noReturn
implements
AnalyzerModule
{
export
default
class
noReturn
implements
AnalyzerModule
{
name
:
string
=
'no return: '
name
:
string
=
`No return: `
description
:
string
=
'Function with return type is not returning'
description
:
string
=
`Function with 'returns' not returning`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import AbstractAst from './abstractAstView'
...
@@ -5,8 +5,8 @@ import AbstractAst from './abstractAstView'
import
{
AnalyzerModule
,
ModuleAlgorithm
,
ModuleCategory
,
ReportObj
,
ContractHLAst
,
VisitFunction
,
ReportFunction
}
from
'./../../types'
import
{
AnalyzerModule
,
ModuleAlgorithm
,
ModuleCategory
,
ReportObj
,
ContractHLAst
,
VisitFunction
,
ReportFunction
}
from
'./../../types'
export
default
class
selfdestruct
implements
AnalyzerModule
{
export
default
class
selfdestruct
implements
AnalyzerModule
{
name
:
string
=
'Selfdestruct: '
name
:
string
=
`Selfdestruct: `
description
:
string
=
'Be aware of caller contracts.'
description
:
string
=
`Beware of caller contracts`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
algorithm
:
ModuleAlgorithm
=
algorithm
.
HEURISTIC
...
...
remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts
View file @
0f90ebb6
...
@@ -13,8 +13,8 @@ interface SimilarRecord {
...
@@ -13,8 +13,8 @@ interface SimilarRecord {
}
}
export
default
class
similarVariableNames
implements
AnalyzerModule
{
export
default
class
similarVariableNames
implements
AnalyzerModule
{
name
:
string
=
'Similar variable names: '
name
:
string
=
`Similar variable names: `
description
:
string
=
'Check if variable names are too similar'
description
:
string
=
`Variable names are too similar`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts
View file @
0f90ebb6
...
@@ -4,8 +4,8 @@ import { isStringToBytesConversion, isBytesLengthCheck } from './staticAnalysisC
...
@@ -4,8 +4,8 @@ import { isStringToBytesConversion, isBytesLengthCheck } from './staticAnalysisC
import
{
AnalyzerModule
,
ModuleAlgorithm
,
ModuleCategory
,
ReportObj
,
CompilationResult
,
MemberAccessAstNode
,
FunctionCallAstNode
}
from
'./../../types'
import
{
AnalyzerModule
,
ModuleAlgorithm
,
ModuleCategory
,
ReportObj
,
CompilationResult
,
MemberAccessAstNode
,
FunctionCallAstNode
}
from
'./../../types'
export
default
class
stringBytesLength
implements
AnalyzerModule
{
export
default
class
stringBytesLength
implements
AnalyzerModule
{
name
:
string
=
'String Length: '
name
:
string
=
`String length: `
description
:
string
=
'Bytes length != String length'
description
:
string
=
`Bytes length != String length`
category
:
ModuleCategory
=
category
.
MISC
category
:
ModuleCategory
=
category
.
MISC
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
thisLocal
implements
AnalyzerModule
{
export
default
class
thisLocal
implements
AnalyzerModule
{
warningNodes
:
MemberAccessAstNode
[]
=
[]
warningNodes
:
MemberAccessAstNode
[]
=
[]
name
:
string
=
'This on local calls: '
name
:
string
=
`This on local calls: `
description
:
string
=
'Invocation of local functions via this'
description
:
string
=
`Invocation of local functions via 'this'`
category
:
ModuleCategory
=
category
.
GAS
category
:
ModuleCategory
=
category
.
GAS
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts
View file @
0f90ebb6
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
...
@@ -5,8 +5,8 @@ import { AnalyzerModule, ModuleAlgorithm, ModuleCategory, ReportObj, Compilation
export
default
class
txOrigin
implements
AnalyzerModule
{
export
default
class
txOrigin
implements
AnalyzerModule
{
txOriginNodes
:
MemberAccessAstNode
[]
=
[]
txOriginNodes
:
MemberAccessAstNode
[]
=
[]
name
:
string
=
'Transaction origin: '
name
:
string
=
`Transaction origin: `
description
:
string
=
'Warn if tx.origin is used'
description
:
string
=
`'tx.origin' is used`
category
:
ModuleCategory
=
category
.
SECURITY
category
:
ModuleCategory
=
category
.
SECURITY
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
algorithm
:
ModuleAlgorithm
=
algorithm
.
EXACT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment